Skip to content

feat: add --express flag to sam deploy and sam sync#9106

Merged
roger-zhangg merged 5 commits into
developfrom
feat/express-deploy-mode
Jul 1, 2026
Merged

feat: add --express flag to sam deploy and sam sync#9106
roger-zhangg merged 5 commits into
developfrom
feat/express-deploy-mode

Conversation

@roger-zhangg

@roger-zhangg roger-zhangg commented Jul 1, 2026

Copy link
Copy Markdown
Member

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?

  • Adds --express/--no-express flag to sam deploy (default: off) and sam sync (default: off)
  • When enabled, passes DeploymentConfig={"Mode": "EXPRESS", "DisableRollback": <value>} to CloudFormation APIs (CreateChangeSet, CreateStack, UpdateStack)
  • DisableRollback inside DeploymentConfig is controlled by the existing --disable-rollback flag
  • When express is active, omits conflicting top-level DisableRollback/OnFailure kwargs (CFN rejects them alongside DeploymentConfig)
  • Persists to samconfig.toml via --save-params (express = true/false)

What side effects does this change have?

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…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).
@roger-zhangg roger-zhangg requested a review from a team as a code owner July 1, 2026 17:49
@github-actions github-actions Bot added area/deploy sam deploy command area/sync sam sync command area/schema JSON schema file pr/internal labels Jul 1, 2026
@roger-zhangg

Copy link
Copy Markdown
Member Author

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: cb8abd8..cc70f6a
Files: 13
Comments: 2

Comment thread tests/integration/deploy/test_deploy_command.py
Comment thread tests/integration/deploy/test_deploy_command.py
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.

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: cb8abd8..7ad60a3
Files: 14
Comments: 1

Comment thread schema/samcli.json Outdated
)
kwargs = {"ChangeSetName": changeset_id, "StackName": stack_name}
if not express:
kwargs["DisableRollback"] = disable_rollback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does setting this explicitly overwrite what the user passes in for --on-failure?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bnusunny

bnusunny commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

PR description needs update to reflect that sam sync is default off now.

@roger-zhangg

Copy link
Copy Markdown
Member Author

PR description needs update to reflect that sam sync is default off now.

updated, thanks

@roger-zhangg roger-zhangg added this pull request to the merge queue Jul 1, 2026
@roger-zhangg roger-zhangg merged commit 5581ff2 into develop Jul 1, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/deploy sam deploy command area/schema JSON schema file area/sync sam sync command pr/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants