[英]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/ Cloudformation具有此功能,您可以在其中设置TTL以触发删除堆栈的命令: 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? 有没有办法对AWS lambda SAM模板做类似的事情? I want some dev lambdas to be automatically deleted after an expiration period I set.
我希望某些dev lambda在设定的有效期限后自动删除。
AWS SAM is just syntactic sugar on top of CloudFormation. AWS SAM只是CloudFormation之上的语法糖。 You can use arbitrary CloudFormation resources in SAM templates as well, so the linked solution should work the same way when using SAM.
您也可以在SAM模板中使用任意CloudFormation资源,因此链接的解决方案在使用SAM时应以相同的方式工作。 Just include the linked CloudFormation template in your SAM template.
只需在您的SAM模板中包括链接的CloudFormation模板即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.