Skip to content

Impossible to delete CloudFormation Stacks in DELETE_FAILED state

0

Hello, I tried to deploy infrastructure as code and it failed in the middle of it. Now I'm in an inconsistent state and I'm unable to delete my CloudFormation stacks. What can I do in such case? Also when I check or uncheck "You may retain resources that are failing to delete" the stack does not get deleted. I tried what was suggested here: https://repost.aws/knowledge-center/cloudformation-stack-delete-failed but I'm running out of option

asked 3 years ago611 views

1 Answer
0

There could be many reasons for stack struck in “DELETE_FAILED” Status.

Check resource dependency – Review the resources being used in stack. There might be dependency with those resources and not allowing you to delete the stack.

Permission issue – There might be the permission issue with resources being used or restricted to delete those resources. You can update the stack policy if it related to permissions.

Try with AWS CLI Command – Try using AWS CLI command aws cloudformation delete-stack to see if it can provide you more details.

Manual deletion of resources – If you want to remove the resources along with stack, first try to delete resources manually through AWS console or using AWS CLI Command. If manual attempt is successful try again to delete the stack. Please be mindful of the removing any resources manually as they might be critical resources. Always understand the implication of deleting any resources before deleting them.

AWS support center – if you do not find any success to delete a stack, reach out to AWS support center to get the guidance or assistance.

AWS
EXPERT

answered 3 years ago

EXPERT

reviewed 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.