DOP-C02 Domain 2: Configuration Management and Infrastructure as Code

A company deployed AWS resources with a CloudFormation template that listed only properties required to create each resource. Optional settings used service defaults, then operators changed those defaults outside the stack. That caused drift from the template. The team wants every property value maintained in the template, wants to detect out-of-band changes, and wants the stack restored to the template definition. Which solution meets these requirements with the LEAST implementation effort?

Multiple choice — select one answer

Answer choices

  1. a. Update the template to set every property (including former defaults). Use the cloudformation-stack-drift-detection-check AWS Config rule with automatic remediation via the AWS-UpdateCloudFormationStack Systems Manager Automation runbook.
  2. b. Create a Lambda function that detects drift on the existing stack and updates the stack using the current template. Invoke it on a daily schedule with Amazon EventBridge.
  3. c. AWS CDK constructs or CloudFormation modules
  4. d. Update the template to set every property (including former defaults). Create a Lambda function that detects stack drift and updates the stack from the template. Schedule it daily with Amazon EventBridge.

Architectural breakdown & explanation

Scheduled DetectStackDrift plus redeploying the known template is the lowest-effort path. Fully enumerating every property and rolling out org-wide Config remediation is heavier.

Correct answer(s): b. Create a Lambda function that detects drift on the existing stack and updates the stack using the current template. Invoke it on a daily schedule with Amazon EventBridge.

Exam domain: Domain 2: Configuration Management and Infrastructure as Code (17% weight on the official guide).

Official documentation & study links

Practice this certification

This page is one question from the AWS Certified DevOps Engineer – Professional bank. Run a full timed practice exam with domain-weighted random questions in your browser.