Skip to content

Stack status of UPDATE_ROLLBACK_COMPLETE but unable to update stack

0

I have a cloud formation stack which failed and it rolled back to UPDATE_ROLLBACK_COMPLETE.

I have updated my JSON cloud formation file and attempted to redeploy.

However, I receive the error message, "Found stackName=Receipt-develop stackId=arn:aws:cloudformation:eu-west-1:********:stack/Receipt-develop/----********** status=UPDATE_ROLLBACK_COMPLETE statusReason=null in result Failed to update CloudFormation stack Receipt-develop"

I have tried using the continue-update-rollback command from AWS CLI, but received the message, "An error occurred (ValidationError) when calling the ContinueUpdateRollback operation: RollbackUpdatedStack cannot be called from current stack status"

Does anyone have any suggestions about what could be tried?

asked 2 years ago2.1K views

3 Answers
1

Hello,

The exact issue is that you're trying to update a CloudFormation stack that has already been rolled back to the UPDATE_ROLLBACK_COMPLETE state. This status indicates that the rollback process has finished successfully, and the stack is in its previous state.

To update the stack, you'll need to delete it and then re-create it with the updated template. This will ensure that the new configuration is applied correctly.

1. Delete the stack: Use the aws cloudformation delete-stack command to remove the existing stack.

2. Re-create the stack: Deploy your updated JSON template to create a new stack with the desired configuration.

https://repost.aws/knowledge-center/cloudformation-stack-cleanup-stuck

EXPERT

answered 2 years ago

  • Yeah, I've seen the option to delete. However, I don't want to do this as my stack includes a database and I also want to confirm that my stack updates are OK before running them on my production stack. Hence I'm keen to find a solution that doesn't involve deleting the stack.

1

Hello.

Is it possible to operate from the management console instead of the AWS CLI?
Also, do you know which AWS resources failed to update?
It is possible that the issue with rollback is occurring due to an AWS resource that failed to update.
If you have just created a CloudFormation stack and are not using anything yet, it may be faster to delete the stack and start over.
https://stackoverflow.com/questions/46264889/how-do-i-update-a-cloudformation-stack-with-state-update-rollback-complete
https://stackoverflow.com/questions/57932734/validationerror-stackarn-aws-cloudformation-stack-is-in-rollback-complete-state

If it is "UPDATE_ROLLBACK_COMPLETE", I think it is a status that can be updated, so if the problem is not resolved even after some time, there is a possibility that the problem cannot be resolved by the user, so please contact AWS Support with "Account and billing".
Inquiries under "Account and billing" can be made free of charge.
https://docs.aws.amazon.com/awssupport/latest/user/case-management.html

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Yes, I can operate from the console. However, the option to restart the rollback wasn't available there, hence I used the AWS CLI, especially in the hope I could "force" something.

    The resource that failed to update was an RDS database. It now has a status of UPDATE_COMPLETE so I don't think there are any problems there.

    You are correct about deleting and starting over if I'm not using anything yet. Unfortunately the stack is in use so deletion and recreation would be somewhat drastic.

    Thanks for the tip about contacting support. I'm going to try again to see if the issue has resolved and then follow up with that.

0

So, the change between the templates that had rolled back and the one that I was submitting that was refusing to update was that I had added a Depends on attribute to the database. Unbeknownst to me, this meant that the template was now above the maximum length of 51200 for a template body! Hence, the error when I tried to upload the new template, although the error message, or lack of, wasn't desperately helpful.

Thanks for looking into this and thanks for the tip about contacting support even though in this instance I didn't use that option.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.