aws / aws/aws-cdk-cli

(cli, toolkit-lib): add option to `deploy` that skips waiting for stack change completion.

Open
#395 7 comments 4 reactions 0 assignees View on GitHub
aws-cdk feature-request p2
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
1d 17h
Merged PRs (30d)
71

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.