aws-cdk: (cli): Unable to recover from UPDATE_ROLLBACK_COMPLETE

CloudFormation is able to update stacks that are in UPDATE_ROLLBACK_COMPLETE but the CDK CLI blocks these with the error:

The stack named XXX is in a failed state: UPDATE_ROLLBACK_COMPLETE

Environment

  • CLI Version : 0.24.1
  • Framework Version: 0.24.1
  • OS :
  • Language :

Other


This is šŸ› Bug Report

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 24
  • Comments: 24 (11 by maintainers)

Commits related to this issue

Most upvoted comments

I agree with @neg3ntropy this seems like a really severe issue. I am currently running into this in my multi-stack project. There are some references between the resources of the stacks, and it doesn’t seem smart enough to understand how to update the stacks on subsequent deployments. Here’s the call-stack I get in the console:

eboozer-app-data-storage
eboozer-app-data-storage: deploying...
eboozer-app-data-storage: creating CloudFormation changeset...
 0/1 | 1:17:56 PM | UPDATE_ROLLBACK_IN_P | AWS::CloudFormation::Stack | eboozer-app-data-storage Export eboozer-app-data-storage:ExportsOutputFnGetAttAppDataBucket857FA106ArnDA77A1F5 cannot be deleted as it is in use by eboozer-formulary-management
 0/1 | 1:18:16 PM | UPDATE_ROLLBACK_COMP | AWS::CloudFormation::Stack | eboozer-app-data-storage 
 1/1 | 1:18:17 PM | UPDATE_ROLLBACK_COMP | AWS::CloudFormation::Stack | eboozer-app-data-storage 

 āŒ  eboozer-app-data-storage failed: Error: The stack named eboozer-app-data-storage is in a failed state: UPDATE_ROLLBACK_COMPLETE
    at /Users/eboozer/Workspaces/next-backend/node_modules/aws-cdk/lib/api/util/cloudformation.ts:247:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at waitFor (/Users/eboozer/Workspaces/next-backend/node_modules/aws-cdk/lib/api/util/cloudformation.ts:157:20)
    at Object.deployStack (/Users/eboozer/Workspaces/next-backend/node_modules/aws-cdk/lib/api/deploy-stack.ts:248:26)
    at CdkToolkit.deploy (/Users/eboozer/Workspaces/next-backend/node_modules/aws-cdk/lib/cdk-toolkit.ts:181:24)
    at main (/Users/eboozer/Workspaces/next-backend/node_modules/aws-cdk/bin/cdk.ts:237:16)
    at initCommandLine (/Users/eboozer/Workspaces/next-backend/node_modules/aws-cdk/bin/cdk.ts:170:9)
The stack named eboozer-app-data-storage is in a failed state: UPDATE_ROLLBACK_COMPLETE

I don’t think UPDATE_ROLLBACK_COMPLETE should be treated as a ā€œfailedā€ state. And if I manually hack the CDK code to not treat rollbacks as unsuccessful, then I can get past this error, or if I manually tweak the template. Otherwise, I have to delete the stacks in the AWS console and start over (which is not always an option).

I am facing the same error, have to manually delete the stack for the changes to reflect back again.