How do I update a CloudFormation stack with state UPDATE_ROLLBACK_COMPLETE?

Viewed 40279

Is it impossible to update a CloudFormation stack once it goes into the UPDATE_ROLLBACK_COMPLETE state? I am using CodePipeline to deploy things. I find that once a stack goes into some invalid state, many times, I have to delete the stack manually and let it recreate everything again. Is that the right way to do this?

2 Answers

If the stack is in UPDATE_ROLLBACK_COMPLETE state you should be able to update the stack again.

If the rollback failed you may need to call ContinueUpdateRollback from CloudFormation before you can update again.

If your stack is stuck in UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS you may be experiencing this issue.

Look into CloudFormation's stack events, there should be some error which would have caused stack update issues.

I had the same problem where status was UPDATE_ROLLBACK_COMPLETE (red font with a cross icon) and CloudFormation stack wasn't getting updated.

I had a look in CloudFormation's stack Events and there was no 'Status reason' against 'UPDATE_ROLLBACK_COMPLETE' status but when I drilled down a bit further, there was an error regarding lambda code using one of the AWS reserved keywords against the status 'UPDATE_FAILED'(screenshot attached).

After removal of keyword from lambda code it worked like a charm. error image regarding usage of reserved keyword which prevented cloudformation stack from getting updated

Related