feat: add --express flag to sam deploy and sam sync#9106
Merged
Conversation
…n Express mode
CloudFormation Express mode completes stack operations ~4x faster by
returning once resource configuration is applied rather than waiting for
full stabilization. This adds --express/--no-express to both commands:
- sam deploy --express (opt-in, default false)
- sam sync --express (opt-in by default, default true)
When enabled, passes DeploymentConfig={"Mode":"EXPRESS","DisableRollback":...}
to CreateChangeSet/CreateStack/UpdateStack. The DisableRollback value inside
DeploymentConfig is controlled by the existing --disable-rollback flag.
Requires boto3/botocore >= 1.43.38 (PR #9084).
Member
Author
|
https://github.com/aws/aws-sam-cli/actions/runs/28536766808 |
After sync infra completes in express mode, log a warning that resources may still be stabilizing. The watch loop already handles transient errors gracefully (logs and continues), so users can re-save to retry.
Default express to false for sync (same as deploy) until public announcement. Added TODO to flip default after announcement. Also add express to sync help text grouping.
seshubaws
reviewed
Jul 1, 2026
| ) | ||
| kwargs = {"ChangeSetName": changeset_id, "StackName": stack_name} | ||
| if not express: | ||
| kwargs["DisableRollback"] = disable_rollback |
Contributor
There was a problem hiding this comment.
does setting this explicitly overwrite what the user passes in for --on-failure?
Member
Author
There was a problem hiding this comment.
express has a new way to set DisableRollback, this is to keep DisableRollback for non express behavior, the new 394-397 is equal to old 381-383 behavior on non-express
seshubaws
approved these changes
Jul 1, 2026
vicheey
approved these changes
Jul 1, 2026
Contributor
|
PR description needs update to reflect that |
Member
Author
updated, thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) does this change fix?
Adds support for CloudFormation Express mode in SAM CLI.
Why is this change necessary?
CloudFormation Express mode (announced Jun 30, 2026) completes stack operations ~4x faster by returning once resource configuration is applied, without waiting for full stabilization (traffic readiness, edge propagation, resource cleanup). SAM CLI should expose this capability to developers for faster iteration cycles.
How does it address the issue?
--express/--no-expressflag tosam deploy(default: off) andsam sync(default: off)DeploymentConfig={"Mode": "EXPRESS", "DisableRollback": <value>}to CloudFormation APIs (CreateChangeSet,CreateStack,UpdateStack)DisableRollbackinsideDeploymentConfigis controlled by the existing--disable-rollbackflagDisableRollback/OnFailurekwargs (CFN rejects them alongsideDeploymentConfig)--save-params(express = true/false)What side effects does this change have?
--expresswith an older botocore, CFN returns anInvalidParameterValueerror (self-explanatory) -> this is rare, if user install from pip or from our installer it will come with correct botocore version.Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.