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

(aws_lambda): get the latest Lambda Layer version in the Lambda function construct. #29214

Open
2 tasks
Koketjo001 opened this issue Feb 22, 2024 · 1 comment
Open
2 tasks
Labels
@aws-cdk/aws-lambda Related to AWS Lambda feature-request A feature should be added or improved. p2

Comments

@Koketjo001
Copy link

Describe the feature

Currently, the @aws-cdk/aws-lambda:recognizeLayerVersion feature flag only works if the lambda layer version and lambda function are in same stack.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda-readme.html#currentversion-updated-hashing-logic-for-layer-versions

Use Case

It would be great to have two different stacks, one for the lambda layer version and one for the lambda function. Changes to lambda layer version in the other stack should automatically trigger an update to the function referencing it that is in another stack.

SSM Parameter is used as a workaround for this use case but when the lambda layer version is updated, the lambda function does not automatically update, it has to be updated manually to reflect the changes in the lambda layer version. Without the SSM parameter, the error Export [name] cannot be updated as it is in use by stack since we cannot update the exports and imports which are in use by other stack is returned.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.118.0

Environment details (OS name and version, etc.)

MacOS, language=TypeScript

@Koketjo001 Koketjo001 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 22, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Feb 22, 2024
@tim-finnigan tim-finnigan self-assigned this Feb 22, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 22, 2024
@tim-finnigan
Copy link

Thanks for the feature request. For more background here is the PR which introduced the changes in 2.27.0, which are referenced in the documentation that you linked.

@tim-finnigan tim-finnigan added p2 and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Feb 22, 2024
@tim-finnigan tim-finnigan removed their assignment Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

2 participants