17

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?

Max
  • 1,051
  • 1
  • 12
  • 20
Jiew Meng
  • 74,635
  • 166
  • 442
  • 756
  • I haven't found that to be the case. Whenever I get to `UPDATE_ROLLBACK_COMPLETE` I can easily just update the stack again. If however the stack is in `ROLLBACK_COMPLETE`, you have to just burn the stack and start over. That said, all resources will have been deleted. – Jamie Starke Sep 19 '17 at 04:12
  • im experiencing this exact same issue. my stack gets into `UPDATE_ROLLBACK_COMPLETE ` state then serverless just ignores updates. did you ever find the reason this was happening? – crogers May 28 '20 at 21:06

2 Answers2

9

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.

TimB
  • 1,141
  • 5
  • 7
  • Nice, I didn't know abobut the continue thing. I've waited up to 10 minutes while `UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS` was happening until it finished. – Samer Jan 07 '19 at 16:31
3

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