aws cloudformation validate-template --template-body file://template.yamlGood preflight check before create or update.
AWS CLI CloudFormation commands for templates, stacks, change sets, events, package, and deploy workflows.
Create, update, inspect, and delete CloudFormation stacks.
aws cloudformation validate-template --template-body file://template.yamlGood preflight check before create or update.
aws cloudformation create-stack --stack-name app-prod --template-body file://template.yaml --capabilities CAPABILITY_NAMED_IAMUse `--parameters` for runtime values and acknowledge IAM capability when needed.
aws cloudformation update-stack --stack-name app-prod --template-body file://template.yaml --capabilities CAPABILITY_NAMED_IAMFails with a no-op error if there are no changes.
aws cloudformation deploy --stack-name app-prod --template-file template.yaml --capabilities CAPABILITY_NAMED_IAMA very convenient wrapper for common stack deployment workflows.
aws cloudformation describe-stacks --stack-name app-prodUseful for checking outputs, status, and rollback information.
aws cloudformation delete-stack --stack-name app-prodDeletes managed resources unless protected or retained.
aws cloudformation wait stack-create-complete --stack-name app-prodUseful in scripts and CI/CD flows.
aws cloudformation wait stack-update-complete --stack-name app-prodLets automation wait for a known-good terminal state.
Preview changes and inspect deployment history.
aws cloudformation create-change-set --stack-name app-prod --change-set-name preview-001 --template-body file://template.yaml --capabilities CAPABILITY_NAMED_IAMUseful in controlled production deploy pipelines.
aws cloudformation describe-change-set --stack-name app-prod --change-set-name preview-001Shows which resources will be added, modified, or replaced.
aws cloudformation execute-change-set --stack-name app-prod --change-set-name preview-001Use after reviewing the proposed modifications.
aws cloudformation describe-stack-events --stack-name app-prodEssential for troubleshooting failed creates and updates.
aws cloudformation list-stack-resources --stack-name app-prodHelpful when mapping logical resources to physical IDs.
aws cloudformation get-template-summary --template-body file://template.yamlUseful in tooling that needs to introspect a template before deployment.
Package local artifacts for deployment-ready templates.
aws cloudformation package --template-file template.yaml --s3-bucket my-cfn-artifacts --output-template-file packaged.yamlUseful when templates reference local Lambda zips or nested templates.
aws cloudformation deploy --stack-name app-prod --template-file packaged.yaml --parameter-overrides Env=prod ImageTag=2026-03-05Common CI/CD deployment pattern for environment-specific values.
aws cloudformation deploy --stack-name app-prod --template-file packaged.yaml --no-fail-on-empty-changesetConvenient in pipelines where idempotent deploys are expected.