Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Amplify -- Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"WAITING_FOR_DEPLOYMENT"}

Summary: When attempting to amplify push changes to my graphql api via the Amplify CLI after aborting an amplify push (using ctrl-c) the cli complains that there is a deployment in progress and cannot deploy.

First error message:

A deployment is in progress.
If the prior rollback was aborted, run:
`amplify push --iterative-rollback` to rollback the prior deployment
`amplify push --force` to re-deploy

Both of those suggested commands result in:

✖ An error occurred when pushing the resources to the cloud

Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"WAITING_FOR_DEPLOYMENT"}
An error occurred during the push operation: Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"WAITING_FOR_DEPLOYMENT"}

All deployments in the Amplify Admin UI show as completed.

I tried amplify pull, amplify env pull, amplify pull --restore (all of which override your local changes - heads up). None worked to solve my problem. Still could not amplify push.

I finally found this idea: https://github.com/aws-amplify/amplify-adminui/issues/172#issuecomment-819784558

Solution

Deleting the deployment-state.json file as suggested in that reply allowed me to perform amplify push again. If you open it up you'll see that this is where the cli must be seeing the {"status":"WAITING_FOR_DEPLOYMENT"}

Sharing my solution here in case someone else has the same problem!

like image 757
Kellen Busby Avatar asked May 18 '21 17:05

Kellen Busby


2 Answers

Solution

Deleting the deployment-state.json file as suggested in that reply allowed me to perform amplify push again. If you open it up you'll see that this is where the cli must be seeing the {"status":"WAITING_FOR_DEPLOYMENT"}.

Sharing my solution here in case someone else has the same problem!

like image 192
Kellen Busby Avatar answered Oct 26 '22 02:10

Kellen Busby


Open the corresponding s3 bucket to the Amplify app.. usually begins with "Amplify-appname...." and delete the "deployment-state.json" file

like image 34
saurav kumar Avatar answered Oct 26 '22 02:10

saurav kumar