Skip to content

Add option to deploy that skips waiting for stack change completion. #395

@commiterate

Description

@commiterate

Describe the feature

Add an option to the deploy action that lets users skip waiting for stack change completion.

Use Case

Today, stack deployments with the CDK always wait for the stack to enter a terminal state (e.g. CREATE_COMPLETE, UPDATE_COMPLETE, ROLLBACK_COMPLETE) before returning.

This can take a long time (read: hours) for traffic shifting deployments (e.g. CloudFormation rolling update for Auto Scaling groups, CodeDeploy Lambda alias canary deployments).

When used in CI, compute time is mostly spent polling for stack change completion. This can create issues with CI job timeouts and exhaust CI duration quotas or drive up costs.

CloudFormation already supports stack state change notifications with SNS topics. Ideally, users can trigger deployments with the AWS CDK and then rely on stack state change notifications to trigger post-deployment tasks (e.g. resume a CI workflow to run integration tests).

Proposed Solution

Add --wait (default, current behavior) and --no-wait flags which let users skip waiting for stack changes to complete.

Other Information

N/A

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.1010.0

Environment details (OS name and version, etc.)

Any

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions