DVA-C02 practice question · Deployment
Drift detection shows that an engineer manually changed a property on a resource in an AWS CloudFormation stack.
Drift detection shows that an engineer manually changed a property on a resource in an AWS CloudFormation stack. The team treats the stack template as the source of truth and wants to overwrite the manual change with the value in the template, without editing the template. Which approach does this?
- ACreate a change set with the deployment mode set to REVERT_DRIFT using the current template, review it, and execute it
- BCreate a standard change set from the unchanged current template and execute it to reapply the template's configuration
- CRun drift detection on the stack again and confirm the results so that CloudFormation corrects the drifted property
- DUse a resource import operation to bring the drifted resource back under the stack with its current settings
Show the answer and explanation
Correct answer: A) Create a change set with the deployment mode set to REVERT_DRIFT using the current template, review it, and execute it
Standard change sets compare only template to template, so they ignore drift. A drift-aware change set created with REVERT_DRIFT compares against the live state and reverts drifted resources to the template's values.
Why each option is right or wrong
- A) Correct. A drift-aware change set (--deployment-mode REVERT_DRIFT) does a three-way comparison of the actual resource state, the previous deployment, and the desired template. It updates drifted resources to match the template even when the template itself hasn't changed.
- B) Incorrect. Traditional change sets compare the new template only with the previous template and don't account for drift. With an unchanged template, CloudFormation sees no changes, so the manual change stays.
- C) Incorrect. Drift detection only finds and reports differences between the actual and expected configuration. It doesn't change any resources; corrective action has to be taken separately.
- D) Incorrect. Resolving drift through import keeps the resource's live configuration, with the template updated to match it. That makes the manual change the source of truth, which is the opposite of what the team wants.
- Exam domain
- Deployment · 24% of DVA-C02
- Question type
- Multiple choice (one answer)
Related DVA-C02 questions
- A team moves its CodeBuild build instructions from the repository root to config/buildspec-release.yml.Deployment
- Which AWS service is specifically designed to orchestrate the end-to-end release process — source, build, test, and…Deployment
- During a CodeDeploy deployment to EC2 instances, which file in the application's deployment bundle defines the lifecycle…Deployment
- In a CodeDeploy AppSpec file for an EC2/on-premises deployment, in which lifecycle event should a developer typically…Deployment
All 67 free DVA-C02 questions by domain · 15 sample questions on one page
Practise the full DVA-C02 exam
This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.
Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.