Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to assign Lambda Layers on the function #1721

Open
2 tasks
tim-hampton opened this issue Apr 9, 2024 · 1 comment
Open
2 tasks

Ability to assign Lambda Layers on the function #1721

tim-hampton opened this issue Apr 9, 2024 · 1 comment
Labels
annotations feature-request A feature should be added or improved. p2 This is a standard priority issue queued

Comments

@tim-hampton
Copy link

Describe the feature

Similar to how we can already assign a Role or ResourceName to a Lambda function using the LambdaFunctionAttribute, we would like to be able to assign a Layer(s) to a Lambda function and also to have it update the CF template's serverless.template file.

Use Case

We have multiple stages that we deploy our Lambda functions to currently, and we have the ability to dynamically change the Role by using conditional build directives in C#, but only because the LambdaFunctionAttribute already exists. Unfortunately we have to manually edit the layer(s) for a given function directly in the serverless.template prior to deploying our Lambdas.

Proposed Solution

Ideally it would be implemented as an attribute, like the LambdaFunctionAttribute is done. If it would be more appropriate to add a Layers property to the existing LambdaFunctionAttribute, that would be acceptable too.

Other Information

The only alternative we've considered is using a PowerShell script to make the change for us when building the project.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS .NET SDK and/or Package version used

AWSSDK.Core 3.7.302.20, AWSSDK.Lambda 3.7.303.37

Targeted .NET Platform

.Net 6+

Operating System and version

Any

@tim-hampton tim-hampton added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2024
@ashishdhingra ashishdhingra added annotations needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Apr 10, 2024
@ashishdhingra
Copy link
Contributor

Needs review with the team.

@ashishdhingra ashishdhingra added p2 This is a standard priority issue queued and removed needs-review labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations feature-request A feature should be added or improved. p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

2 participants