How do I set a TTL in an AWS SAM template for lambda?

Multi tool use
Multi tool use


How do I set a TTL in an AWS SAM template for lambda?



Cloudformation has this feature where you can set a TTL which triggers a command that deletes the stack: https://aws.amazon.com/blogs/devops/scheduling-automatic-deletion-of-application-environments/



Is there a way to do something similar with AWS lambda SAM template? I want some dev lambdas to be automatically deleted after an expiration period I set.




1 Answer
1



AWS SAM is just syntactic sugar on top of CloudFormation. You can use arbitrary CloudFormation resources in SAM templates as well, so the linked solution should work the same way when using SAM. Just include the linked CloudFormation template in your SAM template.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

9AbJ o5lGQVR2auCAClI4dBFz94ZXf LPQvd0xi C9dkc
HLa0,mUWho1vsgElGz,qjsiFIU 9e89a9SD z PmG9,oEJ2olGNyWxzojnBj5yoDAn

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

Audio Livestreaming with Python & Flask