You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a new deploy is made at vanilla Serverless version (no plugins), the default behavior is to skip delete previous lambda versions, i.e., on the generated CF template, the AWS::Lambda::Version resource's DeletionPolicy is set to "Retain".
@pedrobento988 This is intended, because if you let the service have retained versions, you cannot tell anymore, which alias it came from. I.e. if you deploy multiple aliases with different artifacts and configurations into the same stage, you could not just tag any retained version and expect that it was from the expected alias.
The only versions that are intentionally retained are the ones deployed by serverless deploy function because they are not controlled by CloudFormation and (by design) function deploy is intended for debugging only, so in that case you actually know where the version came from and when to delete it.
Activity
HyperBrain commentedon May 12, 2018
@pedrobento988 This is intended, because if you let the service have retained versions, you cannot tell anymore, which alias it came from. I.e. if you deploy multiple aliases with different artifacts and configurations into the same stage, you could not just tag any retained version and expect that it was from the expected alias.
The only versions that are intentionally retained are the ones deployed by
serverless deploy function
because they are not controlled by CloudFormation and (by design) function deploy is intended for debugging only, so in that case you actually know where the version came from and when to delete it.pedrobento988 commentedon May 14, 2018
Thank you for your confirmation.