While creating a CloudFormation stack via the AWS CLI, you want any resources that were successfully created to remain if the stack creation or update fails. Which CLI option should you include when creating or updating the stack to preserve already-provisioned resources on failure?
Choose an answer
Tap an option to check your answer.
Correct answer: Include the --disable-rollback option with the create-stack and update-stack commands..
Why this is the answer
The --disable-rollback option prevents AWS CloudFormation from rolling back successfully provisioned resources when a stack creation or update fails. This means that any resources that were successfully created before the failure will remain in your AWS account, allowing for easier debugging and manual intervention. Incorrect options: --enable-termination-protection prevents a stack from being accidentally deleted, but it does not affect rollback behavior during creation or update failures. Using --parameters ParameterKey=PreserveResources,ParameterValue=True is not a standard CloudFormation CLI option for controlling rollback behavior. Parameters are used to pass values into your CloudFormation template. Using --tags Key=PreserveResources,Value=True applies tags to the stack, which are metadata for organization and cost allocation, but they do not influence the rollback behavior of CloudFormation.
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