While testing a CloudFormation stack, the creation failed and CloudFormation automatically deleted the stack and any resources that had been created, preventing failure analysis. For future stacks, the SysOps admin wants to keep resources that were successfully created when a stack creation fails. What stack creation option achieves this?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the OnFailure parameter to DO_NOTHING when creating the stack..
Why this is the answer
The correct answer is to set the OnFailure parameter to DONOTHING when creating the stack. By default, CloudFormation automatically rolls back and deletes all created resources if any part of the stack creation fails. Setting OnFailure to DONOTHING prevents this automatic rollback, leaving successfully created resources intact for inspection and troubleshooting. This allows the SysOps admin to analyze the state of the resources that were provisioned before the failure, aiding in debugging the CloudFormation template. Setting DisableRollback to False is the default behavior and still performs a rollback. Providing a rollback configuration with DONOTHING is not a valid option for the rollback trigger. Setting OnFailure to ROLLBACK is also the default behavior and would delete the resources.
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