Deleting a stack on the AWS CloudFormation console
To delete a stack
Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation
. -
On the Stacks page in the CloudFormation console, choose the stack that you want to delete. The stack must be currently running.
-
In the stack details pane, choose Delete.
-
Select Delete stack when prompted.
Note
The stack deletion operation can't be stopped once the stack deletion has begun. The stack proceeds to the
DELETE_IN_PROGRESS
state.After the stack deletion is complete, the stack will be in the
DELETE_COMPLETE
state. Stacks in theDELETE_COMPLETE
state aren't displayed in the CloudFormation console by default. To display deleted stacks, you must change the stack view filter as described in Viewing deleted stacks on the AWS CloudFormation console.
To force delete a stack
A stack deletion may fail because a resource in the stack fails to delete. For example,
CloudFormation will fail the deletion of a resource that another stack also depends on. If the
deletion fails and returns a DELETE_FAILED
state, you can choose to retry
using one of two methods.
-
On the Stacks page in the CloudFormation console, choose the stack that you want to force delete.
-
In the stack details pane, choose Retry delete.
-
Choose between the following options:
-
Delete this stack but retain resources: This option allows you to select the specific resources that originally failed to delete, but you want to retain during the force stack deletion.
-
Force delete this entire stack: This option retains all resources that failed to delete.
-
-
Choose Delete to begin the force delete process with your selections.
For more information on stack deletion errors, see Delete stack fails troubleshooting topic.
For information on protecting stacks from being accidentally deleted see Protecting a stack from being deleted.
To review retained resources
After deleting the stack, you can view the resources that were retained in the console.
-
In the stacks list, choose the Filter status and select Deleted.
-
Choose the deleted stack.
-
Choose the Resources tab.
-
All retained resources show the
DELETE_SKIPPED
Status. -
Choose the retained resource you want to review.