Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent CloudFormation stack from being deleted (accidentally)?

CloudFormation stacks are great for automation, however the problem I see with them is how easily they can be deleted, and in turn cascading delete other resources.

I've already found solution to latter problem, it's possible to protect each of resources by modifying it's deletion policy. But how about the stack as a whole? Can it be protected?

like image 714
vartec Avatar asked Feb 13 '23 11:02

vartec


1 Answers

I think the only way is to restrict the permission on the IAM Users you use. You can remove the Delete Stack permission from all relevant users.

like image 171
Edwin Avatar answered May 18 '23 19:05

Edwin