
Answer-first summary for fast verification
Answer: Delete the stack again. Specify that the security group be retained.
When stack deletion fails due to resource in use (SG referenced), you can set the resource to retain on deletion (using --retain-resources in CLI or in console). This removes it from stack but keeps the SG, allowing stack delete without affecting other apps using it. Then manually clean up later if needed. Most efficient.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company uses AWS CloudFormation to deploy its infrastructure. The company recently retired an application. A cloud operations engineer initiates CloudFormation stack deletion, and the stack gets stuck in DELETE_FAILED status. A SysOps administrator discovers that the stack had deployed a security group. The security group is referenced by other security groups in the environment. The SysOps administrator needs to delete the stack without affecting other applications. Which solution will meet these requirements in the MOST operationally efficient manner?
A
Create a new security group that has a different name. Apply identical rules to the new security group. Replace all other security groups that reference the new security group Delete the stack.
B
Create a CloudFormation change set to delete the security group. Deploy the change set.
C
Delete the stack again. Specify that the security group be retained.
D
Perform CloudFormation drift detection. Delete the stack.
No comments yet.