AWS Builder Center
Native Automated Infrastructure Drift Detection and Self-Healing for CloudFormation Stacks

Native Automated Infrastructure Drift Detection and Self-Healing for CloudFormation Stacks

A proposal for AWS CloudFormation to introduce native scheduled drift evaluation and automated self-healing policies to eliminate manual checks and prevent unmanaged infrastructure changes.

Infrastructure as Code (IaC) relies on maintaining absolute synchronization between declared configurations and live runtime environments. While AWS CloudFormation provides drift detection features to compare template specifications against active resources, checking for drift remains a manual operational action or requires setting up complex external monitoring with AWS Config, Amazon EventBridge, and AWS Lambda functions.
Furthermore, once configuration drift occurs—whether due to manual console edits or emergency hotfixes—remediating the divergence requires manual intervention, stack updates, or complex resource re-import procedures.

The Proposed Enhancement

We request native automated drift detection and self-healing policies directly within AWS CloudFormation stack configurations.

Key Features Requested:

  • Scheduled Drift Evaluation: Allow developers to define a periodic cron schedule (e.g., daily or hourly) within stack settings or CloudFormation templates to trigger automated drift checks without external orchestration tools.
  • Native Event Integration: Publish native event notifications to Amazon EventBridge whenever stack resources transition to a  DRIFTED  state.
  • Opt-In Self-Healing: Introduce configurable stack-level or resource-level policies (such as  DriftRemediationPolicy: AutoRevert ) that automatically roll back out-of-band changes to restore resources to their declared template state.
  • Granular Exclusions & Rules: Allow specific resources or properties (e.g., dynamic autoscaling capacities or tags) to be excluded from auto-remediation to prevent unintended overwrites during ongoing operations.

Benefits

  • Reduces reliance on multi-service orchestration (AWS Config, Lambda, EventBridge) for routine compliance.
  • Enforces strict continuous compliance and security posture across enterprise AWS environments.
  • Eliminates accidental configuration creep and speeds up drift recovery without manual effort.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article