SOA-C02 · Question #685
A SysOps administrator needs to delete an AWS CloudFormation stack that is in the DELETE_FAILED state. CloudFormation was unable to delete an Amazon EC2 security group. What should the SysOps…
The correct answer is C. Use the DeleteStack operation with the RetainResources parameter. Specify the security group. When a stack delete fails because a specific resource (such as a security group) can’t be removed, you can tell CloudFormation to skip deleting that resource while it tears down everything else. By calling DeleteStack with RetainResources and listing the problematic security…
Question
A SysOps administrator needs to delete an AWS CloudFormation stack that is in the DELETE_FAILED state. CloudFormation was unable to delete an Amazon EC2 security group. What should the SysOps administrator do to delete the stack?
Options
- ATurn off stack termination protection. Retry the DeleteStack operation.
- BRetry the DeleteStack operation with exponential backoff until the operation succeeds.
- CUse the DeleteStack operation with the RetainResources parameter. Specify the security group.
- DModify the stack template to remove the security group. Update the stack by using the modified
How the community answered
(30 responses)- A10% (3)
- B3% (1)
- C83% (25)
- D3% (1)
Explanation
When a stack delete fails because a specific resource (such as a security group) can’t be removed, you can tell CloudFormation to skip deleting that resource while it tears down everything else. By calling DeleteStack with RetainResources and listing the problematic security group’s logical ID, CloudFormation will delete all other stack resources and leave that SG intact. You can then manually clean up the retained security group. This approach targets exactly the failed resource without needing stack updates or retry loops.
Topics
Community Discussion
No community discussion yet for this question.