Forrest logo
back to the aws tool

aws-cloudformation:tldr:75c52

aws-cloudformation: Check the drift status output of a stack using 'StackDriftDetectionId' from the previous command output.
$ aws cloudformation describe-stack-resource-drifts --stack-name ${stack-drift-detection-id} --profile ${profile}
try on your machine

The command aws cloudformation describe-stack-resource-drifts is used to retrieve information about the drift detection status and drift status of resources within an AWS CloudFormation stack.

Here is an explanation of the command and its parameters:

  • --stack-name: This parameter specifies the name of the CloudFormation stack for which you want to describe the resource drifts. The ${stack-drift-detection-id} variable should be replaced with the actual name of the stack.

  • --profile: This parameter specifies the AWS CLI profile to be used for authentication and authorization. The ${profile} variable should be replaced with the name of the profile configured in your AWS CLI credentials. It is optional if you have only one profile configured or if you're using the default profile.

By running this command, AWS CLI will retrieve information about the resource drift detection for the specified stack and display the results. It will show the resources that have drift detected, their drift status (IN_SYNC, MODIFIED, DELETED, or NOT_CHECKED), and other relevant information like resource type, logical resource ID, and physical resource ID.

Note that to use this command, you should have the appropriate permissions in your AWS IAM policy to access the CloudFormation stack and perform drift detection operations.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the aws tool