An AWS CloudFormation stack deletion fails with DELETE_FAILED for the resource ASGInstanceRole12345678. What is the appropriate action to resolve this so the stack can be deleted successfully?
Choose an answer
Tap an option to check your answer.
Correct answer: Change the CloudFormation template so that ASGInstanceRole12345678 is retained, and then delete that resource manually after the stack operation completes..
Why this is the answer
When a CloudFormation stack deletion fails for a resource like an IAM role (ASGInstanceRole12345678), it often indicates that the role is still attached to or being used by another AWS service or resource outside the stack's direct management. CloudFormation cannot delete a resource that has active dependencies. The most effective way to proceed is to modify the CloudFormation template to retain the problematic resource during stack deletion. This allows the stack deletion to complete successfully for all other resources. After the stack is deleted, you can then manually identify and remove any remaining dependencies on ASGInstanceRole12345678 and delete the role. Opening a support case is generally for service-level issues, not for dependency conflicts during stack deletion. Adding a DependsOn attribute would not resolve an external dependency issue; it manages internal stack resource creation order. There is no "force parameter" in CloudFormation for deleting resources with active dependencies.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed