Docker on Amazon Web Services
上QQ阅读APP看书,第一时间看更新

Deleting a CloudFormation stack

Now that you understand how to create and update a stack, let's discuss how to delete a stack. You can delete a stack very easily using the CloudFormation dashboard by simply selecting the stack, selecting Actions, and then clicking Delete Stack:

Deleting a CloudFormation stack

After clicking Yes, Delete to confirm deletion of your stack, CloudFormation will proceed to delete each resource defined in your stack. Once complete, the stack will disappear from the CloudFormation dashboard, although you change the Filter dropdown that is located below the Create Stack button to click Deleted to view any previously deleted stacks.

Some might argue it is a little too easy to delete your stacks. If you are worried about accidental deletion of your stacks, you can select the Change termination protection option in the preceding screenshot to enable termination protection, which will prevent your stacks from being accidentally deleted.