aws-cloudformation
Model, provision, and manage AWS and third-party resources by treating infrastructure as code. tldr-pages
On several platforms
Several platforms
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 referenceDelete 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 referenceList all stacks
aws cloudformation list-stacks --profile profileIdentify--profileUse a specific profile from your credential file. AWS CLI referenceList 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 referenceCheck 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 referenceInitiate 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 referenceCheck 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