A CloudFormation stack deletion is failing (DELETE_FAILED) because the stack created a security group that other security groups reference. The application has been retired and the administrator must remove the stack without disrupting other systems. Which action will accomplish this most efficiently?
Choose an answer
Tap an option to check your answer.
Correct answer: Retry deleting the stack but specify that the security group resource be retained..
Why this is the answer
When a CloudFormation stack deletion fails due to dependent resources, the most efficient solution is often to retain the problematic resource. In this case, the security group is referenced by other security groups, preventing its deletion. By retrying the stack deletion and specifying that the security group resource be retained, CloudFormation will remove all other resources managed by the stack, but leave the security group intact. This allows the stack to be deleted successfully without impacting the dependent security groups. Creating a replacement security group and updating references is overly complex and time-consuming. Authoring a change set to remove the security group will still fail because of the external dependencies. Running drift detection identifies configuration differences but doesn't resolve deletion failures caused by 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