[ 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 ](estimate-template-cost.html "estimate-template-cost") | 
  * [ previous ](detect-stack-resource-drift.html "detect-stack-resource-drift") | 
  * [ AWS CLI 2.15.40 Command Reference ](../../index.html) » 
  * [ aws ](../index.html) » 
  * [ cloudformation ](index.html) » 

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

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

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

  * detect-stack-set-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-set-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-set-drift  Â¶

##  Description  Â¶

Detect drift on a stack set. When CloudFormation performs drift detection on a
stack set, it performs drift detection on the stack associated with each stack
instance in the stack set. For more information, see [ How CloudFormation
performs drift detection on a stack set
](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-
drift.html) .

> ` DetectStackSetDrift  ` returns the ` OperationId  ` of the stack set drift
> detection operation. Use this operation id with DescribeStackSetOperation to
> monitor the progress of the drift detection operation. The drift detection
> operation may take some time, depending on the number of stack instances
> included in the stack set, in addition to the number of resources included
> in each stack.

Once the operation has completed, use the following actions to return drift
information:

  * Use DescribeStackSet to return detailed information about the stack set, including detailed information about the last _completed_ drift operation performed on the stack set. (Information about drift operations that are in progress isnât included.) 
  * Use ListStackInstances to return a list of stack instances belonging to the stack set, including the drift status and last drift time checked of each instance. 
  * Use DescribeStackInstance to return detailed information about a specific stack instance, including its drift status and last drift time checked. 

For more information about performing a drift detection operation on a stack
set, see [ Detecting unmanaged changes in stack sets
](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-
drift.html) .

You can only run a single drift detection operation on a given stack set at
one time.

To stop a drift detection stack set operation, use StopStackSetOperation .

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

##  Synopsis  Â¶

    
    
      detect-stack-set-drift
    --stack-set-name <val