
Answer-first summary for fast verification
Answer: By using the --disable-rollback option in create-stack and update-stack commands.
The correct answer is B. The --disable-rollback option in the create-stack and update-stack commands prevents AWS CloudFormation from rolling back the stack to its previous state if an error occurs during provisioning. This ensures that any successfully provisioned resources are preserved. This is supported by the high vote community and aligns with the AWS documentation on stack failure options.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
When using AWS CloudFormation to set up infrastructure, how can a developer ensure that successfully provisioned resources are preserved if an error occurs during the provisioning process, and how can they provision and update the stack using the AWS CLI?
A
By using the --enable-termination-protection option in create-stack and update-stack commands.
B
By using the --disable-rollback option in create-stack and update-stack commands.
C
By specifying --parameters with ParameterKey=PreserveResources,ParameterValue=True in create-stack and update-stack commands.
D
By applying --tags with Key=PreserveResources,Value=True in create-stack and update-stack commands.