[ AWS CLI Command Reference ](../../index.html)

  * [ Home ](../../index.html)
  * [ User Guide ](https://docs.aws.amazon.com/cli/latest/userguide/)
  * [ Forum ](https://forums.aws.amazon.com/forum.jspa?forumID=150)
  * [ GitHub ](https://github.com/aws/aws-cli)

###  Navigation

  * [ index ](../../genindex.html "General Index")
  * [ next ](detect-stack-resource-drift.html "detect-stack-resource-drift") | 
  * [ previous ](describe-type-registration.html "describe-type-registration") | 
  * [ AWS CLI 2.15.40 Command Reference ](../../index.html) » 
  * [ aws ](../index.html) » 
  * [ cloudformation ](index.html) » 

  * [ ← describe-type-registration ](describe-type-registration.html "previous chapter \(use the left arrow\)") / 
  * [ detect-stack-resource-drift → ](detect-stack-resource-drift.html "next chapter \(use the right arrow\)")

[ ![Amazon Web Services logo](../../_static/logo.png) ](../../index.html)

###  [ Table of Contents ](../../index.html)

  * detect-stack-drift 
    * Description 
    * Synopsis 
    * Options 
    * Global Options 
    * Examples 
    * Output 

###  Quick search

Search box  Search

###  Feedback

Did you find this page useful? Do you have a suggestion to improve the
documentation? [ Give us feedback ](https://docs.aws.amazon.com/forms/aws-doc-
feedback?hidden_service_name=AWS%20Command%20Line%20Interface&hidden_guide_name=Reference&topic_url=https%3A%2F%2Fdocs.aws.amazon.com%2Fcli%2Flatest%2Freference/cloudformation/detect-
stack-drift.html) .  
If you would like to suggest an improvement or fix for the AWS CLI, check out
our [ contributing guide ](https://github.com/aws/aws-
cli/blob/develop/CONTRIBUTING.md) on GitHub.

###  User Guide

First time using the AWS CLI? See the [ User Guide
](https://docs.aws.amazon.com/cli/latest/userguide/) for help getting started.

[ [ aws  ](../index.html#cli-aws) . [ cloudformation  ](index.html#cli-aws-
cloudformation) ]

#  detect-stack-drift  Â¶

##  Description  Â¶

Detects whether a stackâs actual configuration differs, or has _drifted_ ,
from its expected configuration, as defined in the stack template and any
values specified as template parameters. For each resource in the stack that
supports drift detection, CloudFormation compares the actual configuration of
the resource with its expected template configuration. Only resource
properties explicitly defined in the stack template are checked for drift. A
stack is considered to have drifted if one or more of its resources differ
from their expected template configurations. For more information, see [
Detecting Unregulated Configuration Changes to Stacks and Resources
](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-
stack-drift.html) .

Use ` DetectStackDrift  ` to detect drift on all supported resources for a
given stack, or DetectStackResourceDrift to detect drift on individual
resources.

For a list of stack resources that currently support drift detection, see [
Resources that Support Drift Detection
](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-
stack-drift-resource-list.html) .

> ` DetectStackDrift  ` can take up to several minutes, depending on the
> number of resources contained within the stack. Use
> DescribeStackDriftDetectionStatus to monitor the progress of a detect stack
> drift operation. Once the drift detection operation has completed, use
> DescribeStackResourceDrifts to return drift information about the stack and
> its resources.

When detecting drift on a stack, CloudFormation doesnât detect drift on any
nested stacks belonging to that stack. Perform ` DetectStackDrift  ` directly
on the nested stack itself.

See also: [ AWS API Documentation
](https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackDrift)

##  Synopsis  Â¶

    
    
      detect-stack-drift
    --stack-name <value>
    [--logical-resource-ids <value>]
    [--cli-input-json | --cli-input-yaml]
    [--generate-cli-skeleton <v