# Configuration Drift

Configuration drift is the divergence of a resource’s actual configuration from its declared or approved desired state over time.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/configuration-drift

> Configuration drift occurs when running infrastructure, operating systems, or applications no longer match their intended configuration, often because of manual changes, competing automation, or incomplete deployments. Detecting and managing drift helps engineers preserve security controls, reproduce environments, and investigate unexpected changes before they cause incidents.

Practice exams covering Configuration Drift: [ANS-C01 AWS Certified Advanced Networking - Specialty](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty), [SOA-C03 AWS Certified CloudOps Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 6 key aspects of Configuration Drift

Effective drift management combines an explicit baseline, reliable assessments, actionable evidence, and safe reconciliation across the environment.

1. **Explicit desired state**: Define the expected configuration in version-controlled templates, policies, or configuration documents. Assign ownership so engineers can distinguish an unauthorized deviation from an approved baseline change.
2. **Recurring and change-triggered assessment**: Use change-triggered evaluations for timely detection and scheduled assessments for regular assurance. Monitor evaluation failures and coverage gaps rather than interpreting missing results as compliance.
3. **Drift and compliance are different comparisons**: Template drift checks whether a resource matches its declared configuration; compliance checks whether it satisfies a policy. Evaluate both because matching a template does not establish that the template is secure.
4. **Controlled reconciliation**: Restore the intended state or formally approve and update the baseline. Make remediation idempotent, verify current conditions before changing resources, and require approval where corrections could disrupt workloads.
5. **Investigation and evidence**: Retain configuration history, assessment results, and audit events to establish what changed and who initiated it. Verify remediation with a fresh assessment rather than relying only on a successful automation execution.
6. **Organization-wide coverage**: Apply consistent assessment policies across relevant accounts, Regions, and managed nodes. Centralized reporting improves visibility, but deployment coverage and remediation permissions must be configured separately.

## Cloud services for Configuration Drift

AWS Config assesses resource configurations, while CloudFormation drift detection compares supported infrastructure properties with stack definitions. Systems Manager State Manager addresses desired configuration on managed nodes. Security Hub consolidates security findings, and EventBridge routes relevant events into alerting or response workflows. CloudTrail supplies activity evidence for investigating the changes behind a deviation.

Across an organization, deploy assessment policies and host associations to the intended accounts, Regions, and nodes before relying on centralized results. Use separately authorized remediation workflows, preserve investigation evidence, and verify the resulting state after correction. Centralized findings and successful automation executions do not by themselves establish complete coverage or continuous compliance.

- **[AWS Config](https://blowstack.com/tools/cloud-services-hub/aws-config)**: Records supported resource configurations and evaluates them against AWS Config rules. Conformance packs deploy collections of rules and remediation configurations, while aggregators centralize configuration and compliance visibility across accounts and Regions.
- **[AWS Systems Manager](https://blowstack.com/tools/cloud-services-hub/aws-systems-manager)**: State Manager associations apply desired configurations to managed nodes and report association compliance. Systems Manager Automation runbooks can support investigations and corrective actions, including remediation initiated through AWS Config.
- **[AWS Security Hub](https://blowstack.com/tools/cloud-services-hub/aws-security-hub)**: Security Hub CSPM evaluates security controls and consolidates findings to expose deviations from security requirements. Many controls depend on AWS Config recording, and findings require separately configured response workflows rather than implying automatic remediation.
- **[AWS CloudFormation](https://blowstack.com/tools/cloud-services-hub/aws-cloudformation)**: Drift detection compares supported deployed resource properties with expected values in a stack template. Coverage is limited to supported resources and properties, generally those explicitly set in the template or through its parameters; detection does not itself repair drift.
- **[Amazon EventBridge](https://blowstack.com/tools/cloud-services-hub/amazon-eventbridge)**: Routes supported compliance-change events and security findings to notification, investigation, or remediation targets. Event rules and downstream workflows must be configured explicitly, with appropriate permissions and failure handling.
- **[AWS CloudTrail](https://blowstack.com/tools/cloud-services-hub/aws-cloudtrail)**: Provides API activity records that help investigators attribute configuration changes to identities, sessions, and automation. It complements configuration assessments but does not determine whether the resulting resource state matches an approved baseline.

## Configuration Drift exam questions

Real practice exam questions on Configuration Drift, with the correct answer and its explanation.

### Question 1 (MLA-C02 (beta))

**Question:**

A company operates Amazon SageMaker notebook instances in several AWS accounts and Regions. Its security policy requires direct internet access to be disabled on every notebook instance. The security team needs to assess existing instances, reevaluate compliance when configurations change, and retain configuration history for audits. A central security account must display compliance results across all accounts and Regions. The solution must use managed capabilities with the least custom code. Which solution best meets these requirements?

**Correct answer:** Enable continuous AWS Config recording for SageMaker notebook instances in each workload account and Region. Deploy the managed sagemaker-notebook-no-direct-internet-access rule in each location, and configure an organization aggregator in the central security account.

**Explanation:** AWS Config records notebook configuration history, and the managed rule evaluates whether direct internet access is disabled. Recording and rule evaluation must operate in the source accounts and Regions. An organization aggregator provides a centralized view of their configuration and compliance data without requiring custom evaluation code.

### Question 2 (SAP-C03)

**Question:**

A company manages Amazon EBS volumes across several AWS accounts. Its storage policy permits only specific combinations of volume type, provisioned IOPS, and throughput. The approved combinations change periodically and must be maintained as declarative policy in version control. No AWS Config managed rule implements the complete policy.

AWS Config continuously records EBS volumes and several other resource types in every affected account and Region. Operations engineers must retain permission to modify volumes directly through the EC2 API. The company needs compliance results to be refreshed when AWS Config detects volume configuration changes, including changes made outside infrastructure deployment pipelines. Changes to unrelated resource types must not initiate evaluations of this policy. The platform team does not want to maintain a custom evaluation function or a polling process.

Which solution meets these requirements?

**Correct answer:** Deploy an AWS Config Custom Policy rule with detective evaluation enabled. Express the approved combinations in CloudFormation Guard, use configuration changes as the trigger, and scope the rule to AWS::EC2::Volume.

**Explanation:** AWS Config Custom Policy rules use the CloudFormation Guard DSL to evaluate resource configurations without a custom evaluation function. Detective evaluations are initiated by configuration changes. Scoping the rule to AWS::EC2::Volume ensures that only changes to matching volumes initiate evaluations, including changes made directly through the EC2 API.

### Question 3 (SOA-C03)

**Question:**

A company manages production Amazon CloudWatch Logs log groups through an AWS CloudFormation stack. The deployed template explicitly sets RetentionInDays to 7 for every log group. A new company policy requires 90-day retention, but the template has not been updated.

A scheduled CloudFormation drift detection operation completes successfully and reports IN_SYNC. An automated release gate interprets this result as confirmation that the log groups meet the new retention requirement.

A CloudOps engineer must correct the retention settings through CloudFormation and prevent the release gate from making the same incorrect conclusion. Which approach meets these requirements?

**Correct answer:** Update RetentionInDays to 90 in the version-controlled template and deploy the stack update. Require a separate policy validation in the release gate rather than treating IN_SYNC as proof of policy compliance.

**Explanation:** The log groups match the deployed template, so IN_SYNC is expected even though the template violates the new policy. Updating and deploying the template makes 90 days the managed configuration. Separately validating the retention requirement prevents the gate from confusing template consistency with policy compliance.

### Question 4 (SCS-C03)

**Question:**

A company records all Amazon EBS volumes with AWS Config in one AWS Region. Its security policy requires every volume to have a DataClassification tag. Volumes tagged DataClassification=Confidential must also be encrypted. Volumes with other classification values do not require encryption.

The security team needs one resource-level compliance result that reflects both requirements. Assessments must run automatically when recorded volume configurations change, including when a tag is removed. The team permits declarative policy definitions but does not want to deploy or maintain custom executable assessment code.

Which solution best meets these requirements?

**Correct answer:** Create an AWS Config custom policy rule using Guard with detective evaluation enabled. Scope the rule to AWS::EC2::Volume without a tag filter. Define checks that require the DataClassification tag and require encryption when its value is Confidential.

**Explanation:** AWS Config custom policy rules use the declarative Guard language without requiring a custom Lambda function. Detective evaluation assesses recorded resource configurations when relevant changes occur. Scoping by resource type rather than by the required tag ensures that untagged volumes, including volumes whose tag was removed, remain subject to evaluation. The policy can produce a single compliance result covering both conditions.

### Question 5 (DEA-C01)

**Question:**

A data engineering team uses AWS CloudFormation to deploy an Amazon SQS queue that buffers records for an ingestion pipeline. The stack template explicitly sets MessageRetentionPeriod to 345600 seconds. After a troubleshooting session that involved console changes, the team notices that records expire sooner than expected. The stack still has an UPDATE_COMPLETE status, and the version-controlled template has not changed. The engineer must determine whether the queue's current configuration differs from the configuration managed by the stack, without modifying any resources. Which action should the engineer take?

**Correct answer:** Run CloudFormation stack drift detection, wait for the operation to complete, and inspect the queue's resource drift details for property differences.

**Explanation:** Drift detection compares supported resources' actual configurations with the expected properties explicitly defined in the stack template. Amazon SQS queues support drift detection, so the results can identify a changed MessageRetentionPeriod without modifying the queue. UPDATE_COMPLETE describes the last stack operation, not whether subsequent external changes occurred.

### Question 6 (DOP-C02)

**Question:**

A security incident reveals missing operating system patches on 600 Amazon Linux EC2 instances that are AWS Systems Manager managed nodes. All instances are in the same AWS account and Region, use the same operating system version, and belong to the same patch group with a registered custom patch baseline.

An incident workflow must use AWS-RunPatchBaseline to install approved patches in successive batches over 6 hours, outside a maintenance window. Every batch must use the same approved patch set established when the first batch begins. Administrators must remain able to modify the registered baseline for unrelated patching operations while the incident remediation runs. The workflow must not create another baseline or modify the existing baseline's approval rules.

Which solution meets these requirements?

**Correct answer:** Generate one UUID for the incident patching operation. Pass that UUID as Snapshot-ID to AWS-RunPatchBaseline with Operation set to Install for every instance in every batch.

**Explanation:** A shared Snapshot-ID ensures that the managed nodes use the same point-in-time patch baseline snapshot rather than independently resolving the current baseline. Reusing the UUID across batches preserves the approved patch set despite subsequent baseline changes. The 6-hour operation is within the snapshot's retention period.

### Question 7 (SAA-C03)

**Question:**

A company provisions its application infrastructure with AWS CloudFormation. An approved template explicitly sets an Auto Scaling group's minimum capacity to four instances across two Availability Zones. During troubleshooting, an engineer reduces the minimum capacity to two directly through the Amazon EC2 console. The application remains healthy, and existing policy checks still pass because they require only two instances.

The company needs an automated nightly assessment that identifies resources whose supported properties differ from the deployed template and reports the expected and actual values. The assessment must not modify production resources or change the approved template.

Which solution meets these requirements?

**Correct answer:** Schedule an AWS Lambda function to initiate CloudFormation stack drift detection, wait for detection to complete, and retrieve the resource drift results for reporting.

**Explanation:** CloudFormation drift detection compares the actual configuration of supported resource properties with the expected configuration in the deployed template. Retrieving the resource drift results provides the affected resources and property differences, including expected and actual values, without modifying the resources or template.

### Question 8 (ANS-C01)

**Question:**

A company uses AWS Organizations to manage 70 accounts across four AWS Regions. Its security policy requires that VPC security groups permit inbound TCP port 8443 only from specified corporate IPv4 and IPv6 CIDR ranges. Administrators occasionally add unauthorized rules and remove them within an hour. The security team must centrally identify policy violations and retain the security group configurations that demonstrate these temporary exposures for one year. The solution must cover newly enrolled accounts without automatically changing security group rules. Which solution best meets these requirements?

**Correct answer:** Use CloudFormation StackSets with service-managed permissions to enable continuous AWS Config recording of security groups and deploy a change-triggered custom Config rule in each governed account and Region. Have the rule validate permissions affecting TCP port 8443 against the approved IPv4 and IPv6 CIDRs. Configure at least one year of configuration retention and use an organization aggregator for centralized compliance visibility.

**Explanation:** Continuous recording preserves security group configuration changes, including temporary changes that daily recording could miss. A custom rule can implement the company's specific port and IPv4/IPv6 source restrictions, including permission ranges that encompass port 8443. StackSets automatic deployment can extend the setup to newly enrolled accounts in targeted organizational units and Regions. The aggregator centralizes compliance results, while the source accounts retain configuration history. No remediation is required.

## Practice Configuration Drift in a full exam

Questions on Configuration Drift in each practice exam, with every answer option and an explanation for each:

- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 15 questions
- [SOA-C03](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate): 11 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 5 questions
- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 5 questions
- [ANS-C01](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty): 5 questions
- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 3 questions
- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 2 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 1 question

## What is Configuration Drift

Configuration drift is a mismatch between an expected configuration and the configuration that actually exists. The expected state might be defined in an infrastructure-as-code template, a version-controlled operating-system baseline, or an approved security policy. For example, an administrator might temporarily open a security group to the internet during troubleshooting but forget to restore its original rules. The resource continues working, yet its configuration has diverged from the approved baseline.

Reliable drift management starts by defining the source of truth and the scope of comparison. Infrastructure templates describe particular resources and properties, while security policies express constraints such as requiring encryption or prohibiting unrestricted administrative access. These comparisons answer different questions. A resource can differ from its deployment template while still satisfying security policy, and it can match its template while remaining insecure because the template itself is flawed.

Cloud implementations combine change-triggered evaluations with scheduled assessments. Change-triggered checks shorten the interval between a modification and its detection. Scheduled checks provide recurring assurance and can assess conditions that do not have a suitable change trigger. Neither approach guarantees complete visibility: coverage depends on supported resource types, recorded properties, enabled accounts and Regions, permissions, and successful execution. A missed assessment or failed configuration recorder should therefore be treated as a monitoring gap, not as evidence of compliance.

On AWS, AWS Config records supported resource configurations and evaluates them using rules. Conformance packs package rules and remediation configurations to deploy a consistent assessment baseline across accounts and Regions. Rule evaluations may be change-triggered, periodic, or both, depending on the rule. Organization-wide aggregation supports centralized investigation, but aggregating results does not itself deploy rules or remediate resources.

Host-level configuration requires a different mechanism. AWS Systems Manager State Manager uses associations to apply desired configurations to managed nodes on a defined schedule or when otherwise triggered. An association might ensure that a security agent is installed and configured. Its compliance results reflect the association’s execution and assessment logic; they are not proof that every host setting remains continuously correct between executions. AWS Security Hub security controls and integrated findings provide centralized security posture visibility, but they do not replace infrastructure-template comparisons or host configuration enforcement.

Detection should lead to a controlled response. Preserve the observed configuration, identify the responsible change using audit records, assess the impact, and either restore the baseline or approve and codify the new state. For example, an unexpected inbound access rule can generate an alert and start a remediation workflow. Low-risk corrections can be automatic, while changes that might interrupt production traffic should require approval. Remediation should use least-privilege permissions, bounded retries, and checks that the resource is still noncompliant before modification.

Automation introduces trade-offs. Frequent assessments increase execution costs and API activity, while slower schedules leave longer exposure windows. Uncoordinated controllers can repeatedly overwrite one another, and automatic rollback can erase a legitimate emergency change. Use explicit ownership, time-limited exceptions, idempotent remediation, and post-remediation verification. Infrastructure as code reduces opportunities for drift but does not prevent out-of-band changes by itself. Drift detection is also not threat detection: an unexpected change warrants investigation, but it is not automatically malicious.

## Learn Configuration Drift in lessons

7 short lessons on Configuration Drift in 7 certification courses.

- MLA-C02 (beta): Configuration Drift: monitoring approved baselines (Premium), https://app.blowstack.com/lessons/configuration-drift-monitoring-approved-baselines-mla-c02
- SAP-C03: Configuration Drift: reliable baseline monitoring (Premium), https://app.blowstack.com/lessons/configuration-drift-reliable-baseline-monitoring-sap-c03
- SOA-C03: Configuration Drift: infrastructure stack baselines (Premium), https://app.blowstack.com/lessons/configuration-drift-infrastructure-stack-baselines-soa-c03
- SCS-C03: Configuration Drift: recurring baseline assessments (Premium), https://app.blowstack.com/lessons/configuration-drift-recurring-baseline-assessments-scs-c03
- DEA-C01: Configuration Drift: preserving IaC baselines (Premium), https://app.blowstack.com/lessons/configuration-drift-preserving-iac-baselines-dea-c01
- DOP-C02: Configuration Drift: controlled reconciliation (Premium), https://app.blowstack.com/lessons/configuration-drift-controlled-reconciliation-dop-c02
