QuestionQ54

VerifiedTroubleshooting and Optimization

A developer received the following error message during an AWS CloudFormation deployment:

DELETE_FAILED (The following resource(s) failed to delete: [ASGInstanceRole12345678].)

Which action should the developer take to resolve this error?

Explanation

When CloudFormation cannot delete a resource (often because of dependencies or inline policies on IAM roles), the solution is to set DeletionPolicy: Retain on that resource in the template, then manually delete it from the AWS console after the stack deletion completes. This unblocks the stack deletion while preserving the resource for safe manual cleanup.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!