AWS Certified Developer – Associate (DVA-C02) — Question 361

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?

Answer options

Correct answer: C

Explanation

When a resource fails to delete and blocks stack deletion, the standard resolution is to instruct CloudFormation to retain the failed resource so the stack can delete successfully, followed by manual cleanup of that resource. Adding a DependsOn attribute does not resolve an active deletion failure, and contacting AWS Support is unnecessary for this standard operational issue. Furthermore, CloudFormation does not support a force parameter with a role-arn to bypass deletion errors.