Validate a template
Check a template for basic syntax and structural validity.
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.
Check a template for basic syntax and structural validity.
aws cloudformation validate-template --template-body file://template.yamlGood preflight check before create or update.
Create a CloudFormation stack from a local template.
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.
Update an existing stack with a new template or parameters.
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.
Create or update a stack using `deploy`.
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.
Block until a stack finishes creating.
aws cloudformation wait stack-create-complete --stack-name app-prodUseful in scripts and CI/CD flows.
Block until a stack finishes updating.
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.
Apply the changes in an existing change set.
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.
Return parameter and capability requirements for a template.
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.
Upload local artifacts and rewrite a template.
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.
Pass parameters at deployment time.
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.
Treat no-op deployments as success.
aws cloudformation deploy --stack-name app-prod --template-file packaged.yaml --no-fail-on-empty-changesetConvenient in pipelines where idempotent deploys are expected.