AWS Certified Developer – Associate — Question 402
A developer received the following error message during an AWS CloudFormation deployment:
DELETE_FAILED (The following resource(s) failed to delete: [ASGInstanceRolel2345678].)
Which action should the developer take to resolve this error?
Answer options
- A. Contact AWS Support to report an issue with the Auto Scaling Groups (ASG) service.
- B. Add a DependsOn attribute to the ASGInstanceRole12345678 resource in the CloudFormation template. Then delete the stack.
- C. Modify the CloudFormation template to retain the ASGInstanceRolel2345678 resource. Then manually delete the resource after deployment.
- D. Add a force parameter when calling CloudFormation with the role-arn of ASGInstanceRolel2345678.
Correct answer: C
Explanation
When AWS CloudFormation fails to delete a specific resource during stack deletion, the standard resolution is to retry the deletion and select the option to retain the failing resource (ASGInstanceRolel2345678). This allows the stack deletion process to finish successfully, after which the developer can manually delete the retained resource. Other options, such as using a force parameter or contacting support, are either non-existent features or unnecessary troubleshooting steps.