Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow specifying a retention policy for lambda layers #6010
What did you implement:
closes #5765 by adding an option to allow the retention of previous layer verions
How did you implement it:
If the user specifies
How can we verify it:
Then check that your lambda console has 2 versions of the foobar layer.
Is this ready for review?: YES
@nford, That's necessary to work around cloudformation limitations. If it were to use the same logical id, the new version would replace the old one, thus the retain property would do nothing. There is however still an
@dschep How can I export the value of this output generated by the framework so it can be used in another stack? Where CloudFormation has output "CommonLibsLambdaLayerQualifiedArn" with the description "Current Lambda layer version" the following fails:
" The CloudFormation template is invalid: Unresolved resource dependencies [CommonLibsLambdaLayerQualifiedArn] in the Outputs block of the template"
I guess I'm sort of re-outputing an output, but there seems to be no way to export a layer with retain set to true, and there is no way to update a stack referencing a layer in another stack with retain set to false.
@pmuens that's in the Outputs section - it's cloudformation syntax. Just changed it to:
And the result is the same, all my other values export fine to the other stack but
Using the following Outputs code:
Notice CommonLibsLambdaLayerQualifiedArn is there but when I add it manually:
to outputs in an effort to add an EXPORT for it, I get the error
Anyway, thanks for your time.