Is there any way to disable auto-rollback on CDK stack

2.6k Views Asked by At

We are creating aws custom resource in a stack using cdk which triggers a lambda. In our case if any failure happens in lambda, it sends a failure signal to custom resource and custom resource trigger auto-rollback to previous version of stack. We want to prevent this case. Our requirement is if the lambda gets failed, custom resource stack just show failure status and don't trigger any rollback deployment.

Is there any way to set disable-rollback property on stack using cdk

1

There are 1 best solutions below

3
gshpychka On BEST ANSWER

Yes, the CDK CLI provides the --no-rollback flag just for this purpose:

cdk deploy MyStack --no-rollback