Chapter 29 · AWS Cloudformation
Subchapter 29.4
references/deploy-with-express-mode.script.mdMarkdown12 KBView on GitHub
Deterministic procedure for deploying CloudFormation stacks using Express mode — a deployment mode that completes stack operations as soon as resource configuration is applied, giving immediate confirmation to proceed to the next iteration. Resources continue becoming ready to serve traffic in the background.
Express mode works with all existing CloudFormation templates and requires no template changes. It is recommended for development workflows where you iterate frequently and need fast deployment confirmation.
When to use Express mode:
When NOT to use Express mode:
What Express mode skips:
running state)What does NOT change:
CREATE, UPDATE, or DELETE.true if the user wants rollback on failure.CAPABILITY_IAM, CAPABILITY_NAMED_IAM) if the template creates IAM resources.Constraints for parameter acquisition:
Check which mechanism is available to invoke AWS APIs.
Constraints:
call_aws tool from the AWS MCP Server (preferred for sandboxed execution, audit logging, and observability)aws) available on the user’s system (verify with which aws or aws --version)aws sts get-caller-identity --region <region>). This read-only call is acceptable during verification because it does not modify any resourcesVerify with the user that Express mode is the right choice for their use case.
Constraints:
"disableRollback": false in the deployment configurationPrepare the template for the operation.
Constraints:
--template-body--template-url because --template-body has a size limit--template-url directlyDELETE operationsRun the stack operation with the --deployment-config parameter set to Express mode.
Constraints:
--deployment-config '{"mode": "EXPRESS"}' on the stack operation--deployment-config '{"mode": "EXPRESS", "disableRollback": false}'--capabilities if the template creates IAM resourcesaws cloudformation deploy because it does not support --deployment-config. Use create-stack, update-stack, or delete-stack instead.Note: When using
call_aws, pass the template content inline in theTemplateBodyparameter — thefile://syntax is AWS CLI-specific and does not work withcall_aws.
Create a stack:
aws cloudformation create-stack \
--stack-name <stack_name> \
--template-body file://<path> \
--region <region> \
--deployment-config '{"mode": "EXPRESS"}' \
--capabilities CAPABILITY_IAMUpdate a stack:
aws cloudformation update-stack \
--stack-name <stack_name> \
--template-body file://<path> \
--region <region> \
--deployment-config '{"mode": "EXPRESS"}' \
--capabilities CAPABILITY_IAMDelete a stack:
aws cloudformation delete-stack \
--stack-name <stack_name> \
--region <region> \
--deployment-config '{"mode": "EXPRESS"}'With rollback enabled:
aws cloudformation create-stack \
--stack-name <stack_name> \
--template-body file://<path> \
--region <region> \
--deployment-config '{"mode": "EXPRESS", "disableRollback": false}' \
--capabilities CAPABILITY_IAMExpress mode also works with change sets. The deployment configuration is stored with the change set and applied when executed.
Constraints:
To use Express mode with a change set, supply --deployment-config at create-change-set time:
aws cloudformation create-change-set \
--stack-name <stack_name> \
--template-body file://<path> \
--change-set-name <change_set_name> \
--deployment-config '{"mode": "EXPRESS"}' \
--region <region> \
--capabilities CAPABILITY_IAMYou MUST NOT specify --deployment-config again at execute-change-set time because it is already stored with the change set
You SHOULD recommend the change set path when the user also wants pre-deployment validation before deploying with Express mode (change set creation runs all validation checks before execution)
When the user is deploying with the AWS CDK, Express mode is activated with the --express flag.
Constraints:
cdk deploy --express to deploy with Express modecdk deploy --express --rollbackcdk deploy --hotswap as a substitute for Express mode — they are different capabilities:
Guide the user on what to expect after Express mode completes.
Constraints:
running stateThe following are NOT supported with Express mode. You MUST inform the user if their scenario involves any of these:
AWS::CloudFormation::CustomResource and Custom::*) — these follow default completion behavior even when Express mode is activeaws cloudformation deploy CLI command — does not support --deployment-config; use create-stack or update-stack instead$ aws cloudformation create-stack \
--stack-name my-dev-vpc \
--template-body file://vpc.yaml \
--region us-west-2 \
--deployment-config '{"mode": "EXPRESS"}'
{
"StackId": "arn:aws:cloudformation:us-west-2:123456789012:stack/my-dev-vpc/abc123"
}
Stack "my-dev-vpc" creation completed (Express mode).
Resources are configured. VPC ID, subnet IDs, and other outputs are available.
Background stabilization (route propagation, NAT gateway activation) continues.$ cdk deploy --express
✅ MyDevStack
Express mode: stack completed when resource configuration was applied.
Outputs:
MyDevStack.VpcId = vpc-0abc123def456
MyDevStack.ApiEndpoint = https://abc123.execute-api.us-west-2.amazonaws.com
Resources continue stabilizing in the background.$ aws cloudformation update-stack \
--stack-name my-dev-vpc \
--template-body file://vpc-v2.yaml \
--region us-west-2 \
--deployment-config '{"mode": "EXPRESS", "disableRollback": false}'This is expected behavior with Express mode. Resources receive their configuration immediately but may still be starting up, propagating, or cleaning up. Monitor resource-specific readiness through CloudWatch, health checks, or service dashboards. If a resource does not stabilize, redeploy the stack to retry.
The --deployment-config parameter requires a CLI version that supports Express mode. Update the AWS CLI to the latest version. If using CDK, use --express instead.
The aws cloudformation deploy command does not support --deployment-config. Use create-stack or update-stack directly. In CDK, use cdk deploy --express.
Custom resources always follow default completion behavior regardless of Express mode. This is by design — custom resources define their own completion logic.
Express mode is not supported for StackSet operations. Remove --deployment-config when working with StackSets.
Express mode disables rollback by default. To re-enable, add "disableRollback": false to the deployment configuration JSON, or use cdk deploy --express --rollback in CDK.