Lambda layer versions are not being retained
See original GitHub issueBug Report
Description
- What did you do?
Deployed a layer-only service with
retain: true
- What happened? Previous layer version is deleted
- What should’ve happened?
Since
retain
is set totrue
, the previous layer version should still be available - What’s the content of your
serverless.yml
file?
service: config-layer
provider:
name: aws
profile: personal
layers:
config:
path: ./
retain: true
compatibleRuntimes:
- nodejs10.x
- What’s the output you get when you use the
SLS_DEBUG=*
environment variable (e.g.SLS_DEBUG=* serverless deploy
) debug.txt
Similar or dependent issues:
In PR #6545, S3 key was removed from the sha hash, which results in the same logical id with every deployment. I believe cloudformation removes versions with the same logical id, regardless of DeletionPolicy: Retain
being set.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:29 (4 by maintainers)
Top Results From Across the Web
AWS::Serverless::LayerVersion
Specifies whether old versions of your LayerVersion are retained or deleted after an update.
Read more >Are old AWS Lambda layers automatically removed? If not ...
Old layers are not automatically deleted. You can run a CLI command such as the following to delete a layer version: $ aws...
Read more >AWS Lambda Layers - Serverless Framework
All of the Lambda layers in your serverless service can be found in serverless.yml under ... If true, layer versions are not deleted...
Read more >Fun with AWS Lambda Layers and Serverless - Medium
It turns out, Serverless by default do not retain versions of your Lambda layers, this setting is set to false. See the Serverless...
Read more >Lambda::LayerVersion: how to retain layer versions? : r/aws
If you want to create a new version, you should add they key value pair "RetentionPolicy: Retain" to your layer in the AWS...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m interested too, what are next steps on this?
Any news on this one?