'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!
Solution 1:[1]
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!
Solution 2:[2]
Open the corresponding s3 bucket to the Amplify app.. usually begins with "Amplify-appname...." and delete the "deployment-state.json" file
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ataravati |
Solution 2 | saurav kumar |