-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(lambda): layer version removal policy #12792
feat(lambda): layer version removal policy #12792
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR. The code looks good.
I have a few comments around the documentation.
The `lambda.LayerVersion` class can be used to define Lambda layers and manage | ||
The `lambda.LayerVersion` class can be used to define Lambda layer versions and manage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this change and add a statement at the end of this section about configuring removal policies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added better documentation to the README. Let me know if it's too much detail
### Layer Versioning and Removal Policies | ||
|
||
By default, updating a layer creates a new version and deletes the current version managed by the stack. Alternatively, a removal policy can be used to retain the current version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this and I don't think you need a separate section for this -
### Layer Versioning and Removal Policies | |
By default, updating a layer creates a new version and deletes the current version managed by the stack. Alternatively, a removal policy can be used to retain the current version: | |
By default, updating a layer creates a new layer version, and CloudFormation will delete the old version as part of the stack update. | |
Alternatively, a removal policy can be used to retain the current version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds much clearer, thanks
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
closes aws#12718 Allows providing a removal policy for the `Lambda::LayerVersion` L2 construct to retain previous layer versions when the layer is updated. When a value is not provided, the default CloudFormation behavior is used, which is to delete the previous version defined in the stack.
closes #12718
Allows providing a removal policy for the
Lambda::LayerVersion
L2 construct to retain previous layer versions when the layer is updated. When a value is not provided, the default CloudFormation behavior is used, which is to delete the previous version defined in the stack.