Skip to content

Feature request: add --express flag to sam delete #9115

Closed

Description

@KyleDoherty1

Description

PR #9106 adds --express/--no-express support to sam deploy and sam sync for CloudFormation Express mode, but sam delete does not expose the same flag.

As noted in PR #9106 comment:

Usage: sam delete [OPTIONS]
Try 'sam delete -h' for help.

Error: No such option: --express

For teams using express mode during development, delete is part of the same iteration loop as deploy/sync. Without express support on sam delete, teardown remains on the slower standard path even when stacks were created or updated with --express.

Use Case

During fast development iteration, developers want to tear down stacks quickly without waiting for full resource stabilization and cleanup. CloudFormation Express mode supports this for delete operations:

aws cloudformation delete-stack --stack-name my-stack \
    --deployment-config '{"Mode": "EXPRESS"}'

See the CloudFormation Express mode documentation and the delete-stack API reference.

Proposed Behavior

Add --express/--no-express to sam delete, consistent with sam deploy and sam sync:

  • When enabled, pass DeploymentConfig={"Mode": "EXPRESS"} to the CloudFormation DeleteStack API
  • Default: off (for backwards compatibility)
  • Persist to samconfig.toml via --save-params as express = true/false
  • After delete completes in express mode, surface a message that some resources may still be removing in the background (similar to deploy/sync)

Current Workaround

Use the AWS CLI directly:

aws cloudformation delete-stack --stack-name <stack-name> \
    --deployment-config '{"Mode": "EXPRESS"}'

Note: this bypasses sam delete's guided cleanup of S3 artifacts, ECR images, and companion stacks.

Related

Activity

  1. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    ⚠️COMMENT VISIBILITY WARNING⚠️

    Comments on closed issues are hard for our team to see.
    If you need more assistance, please either tag a team member or open a new issue that references this one.
    If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions