Skip to content

Amplify deployment stuck unable to rollback or to continue

0

We are unable to perform any update on amplify stack. I followed instructions specified on https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html by continuing to rollback. But we could not continue to rollback.

We tried to delete the failed nested stack, and it also failed to delete. I checked all the applications such as dynamodb, but application is not working. We want to continue rollback to the point where application was working. I searched a lot and found regarding mostly about UI like to roll back to a commit, but this won't help in this scenario.

Can you please provide steps to roll back to the point before we started updating?

asked 2 years ago383 views

1 Answer
0

I understand you're facing a challenging situation with your AWS Amplify deployment being stuck and unable to rollback or continue. This is indeed a complex issue, especially when it involves nested stacks and multiple AWS services. Here are some steps you can try to roll back to the point before you started updating:

  1. First, attempt to use AWS CodeDeploy's manual rollback feature. Even though Amplify uses CloudFormation under the hood, it may have created CodeDeploy deployments. You can try to create a new deployment using a previously successful application revision. This might help restore your application to a known working state.

  2. If the CodeDeploy approach doesn't work, you'll need to focus on the CloudFormation stacks. Since you mentioned nested stacks, start by identifying the root stack for your Amplify application.

  3. In the CloudFormation console, select the root stack and choose "Update stack". Instead of providing a new template, select "Use current template".

  4. In the stack options, look for "Rollback configuration". Here, you can specify a monitoring time and alarms that will trigger an automatic rollback if they enter the ALARM state during stack creation or update.

  5. If this doesn't work, you may need to contact AWS Support for further assistance. They have tools and permissions to help unstick complex CloudFormation scenarios.

  6. As a last resort, if you have a backup of your application and database from before the update, you might consider recreating the entire Amplify environment from scratch and restoring your data.

Remember, rolling back can have unexpected consequences, especially if database schemas or other critical components have changed. Always ensure you have recent backups before attempting any major operations.

For future deployments, consider setting up automatic rollbacks in your Amplify configuration. This can help prevent situations where deployments get stuck in an unrecoverable state.

If none of these steps work, you may need to engage with AWS support directly, as they have additional tools and permissions to help resolve complex CloudFormation and Amplify issues.
Sources
Redeploy and roll back a deployment with CodeDeploy - AWS CodeDeploy
RollbackInfo - AWS CodeDeploy
AWS Amplify | Extensible Web & Mobile Apps | Amazon Web Services

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.