nerdexam
Amazon

DVA-C02 · Question #221

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 resource

The correct answer is B. Add a --disable-rollback command line option to the create-stack command and the update-stack. The --disable-rollback command-line option will prevent CloudFormation from rolling back the stack to the previous state if an error occurs. This will ensure that successfully provisioned resources are preserved.

Submitted by packet_pusher· Mar 5, 2026Deployment

Question

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?

Options

  • AAdd an --enable-termination-protection command line option to the create-stack command and
  • BAdd a --disable-rollback command line option to the create-stack command and the update-stack
  • CAdd a --parameters ParameterKey=PreserveResources,ParameterValue=True command line
  • DAdd a --tags Key=PreserveResources,Value=True command line option to the create-stack

How the community answered

(28 responses)
  • A
    11% (3)
  • B
    79% (22)
  • C
    7% (2)
  • D
    4% (1)

Explanation

The --disable-rollback command-line option will prevent CloudFormation from rolling back the stack to the previous state if an error occurs. This will ensure that successfully provisioned resources are preserved.

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice