Cloud concept · Updated

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

In short

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.

Cloud Concepts Hub →

6 key aspects of Configuration Drift

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

01
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.

02
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.

03
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.

04
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.

05
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.

06
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 ConfigAWS 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 ManagerAWS 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 HubAWS 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 CloudFormationAWS 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 EventBridgeAmazon 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 CloudTrailAWS 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. Answer them with every option in the exam simulator.

MLA-C02 (beta)

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?

Show answerCORRECT 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.

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.

SAP-C03

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?

Show answerCORRECT 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.

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.

SOA-C03

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?

Show answerCORRECT 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.

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.

Practice Configuration Drift in a full exam

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

Start a free practice exam

What is Configuration Drift

3 min read

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.

and 1 more lesson

Open the lessons