😊

amplify pushに失敗するときの対処法

に公開

amplify push 中にネットワークが切れ deploy に失敗した後、
再度 push しようとしたら下記のようなエラーが出た。

$ amplify push --force
 Successfully pulled backend environment dev from the cloud.

    Current Environment: dev

┌──────────┬────────────────┬───────────┬───────────────────┐
 Category Resource name Operation Provider plugin
├──────────┼────────────────┼───────────┼───────────────────┤
 Api testapp Update awscloudformation
├──────────┼────────────────┼───────────┼───────────────────┤
 Auth testappeespe58c No Change awscloudformation
└──────────┴────────────────┴───────────┴───────────────────┘
? Are you sure you want to continue? Yes
 An error occurred when pushing the resources to the cloud
🛑 An error occurred during the push operation: Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"DEPLOYING"}

GitHub のイシューにあるとおり、S3 のdeployment-state.json デプロイ状態を管理するというファイルがあるのでそれを削除すれば解消した。

Discussion