CmdID

CmdID / Commands

aws-cloudformation

Model, provision, and manage AWS and third-party resources by treating infrastructure as code. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Create a stack from a template file

aws cloudformation create-stack --stack-name stack_name --region region --template-body file://path/to/file.yml --profile profileIdentify
--stack-nameThe name that's associated with the stack. AWS CLI reference
--regionThe region to use. AWS CLI reference
--template-bodyStructure that contains the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. AWS CLI reference
--profileUse a specific profile from your credential file. AWS CLI reference

Delete a stack

aws cloudformation delete-stack --stack-name stack_name --profile profileIdentify
--stack-nameThe name or the unique stack ID that's associated with the stack. AWS CLI reference
--profileUse a specific profile from your credential file. AWS CLI reference

List all stacks

aws cloudformation list-stacks --profile profileIdentify
--profileUse a specific profile from your credential file. AWS CLI reference

List all running stacks

aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE --profile profileIdentify
--stack-status-filterStack status to use as a filter. AWS CLI reference
--profileUse a specific profile from your credential file. AWS CLI reference

Check the status of a stack

aws cloudformation describe-stacks --stack-name stack_id --profile profileIdentify
--stack-nameIf you don't pass a parameter to StackName, the API returns a response that describes all resources in the account, which can impact performance. AWS CLI reference
--profileUse a specific profile from your credential file. AWS CLI reference

Initiate drift detection for a stack

aws cloudformation detect-stack-drift --stack-name stack_id --profile profileIdentify
--stack-nameThe name of the stack for which you want to detect drift. AWS CLI reference
--profileUse a specific profile from your credential file. AWS CLI reference

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 profileIdentify
--stack-nameThe name of the stack for which you want drift information. AWS CLI reference
--profileUse a specific profile from your credential file. AWS CLI reference