AWS Certified Developer – Associate (DVA-C02) — Question 202

A developer is setting up infrastructure by using AWS CloudFormation. If an error occurs when the resources described in the Cloud Formation template are provisioned, successfully provisioned resources must be preserved. The developer must provision and update the CloudFormation stack by using the AWS CLI.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

The correct answer is B because using the --disable-rollback option allows the stack creation or update to continue even if an error occurs, preserving already provisioned resources. Option A is incorrect as enable-termination-protection does not prevent rollback on errors. Options C and D do not address error handling during stack creation and will not preserve resources in the event of a failure.