LoginSignup
0
0

More than 1 year has passed since last update.

amplify push と戦う3 waitingForDeployment

Last updated at Posted at 2022-12-08

症状1

amplify push -y 
~~~
~~~
~~~
["Index: 1 State: {\"deploy\":\"waitingForDeployment\"} Message: Resource is not in the state stackUpdateComplete"]

イベントを確認する(amplify pushでエラーの時はCloudFormationイベントを必ず見るようしている)
amplify>アプリ>Backend environments>環境のアクション>詳細を表示>最新のデプロイアクティビティ>CloudFormation
イベントタグを選択する

特にイベントが記録されてない場合

対処

schema.graphqlを修正した時に出た。
具体的には・・・
type xxxx などのテーブルに変更を加えた場合に出る。
一つの属性に複数の@index queryFieldのある属性を削除していると出る。
なんだかよくわからないがインデックスがらみ

突然消すのではなく、queryFieldを消したり、indexの数を減らしてpushを何度かしたら良い。

  status: attxxxxxx!
    @index(
      name: "xxxxxx"
      sortKeyFields: ["id"]
      queryField: "xxxqqqq"
    )
    @index(
      name: "yyyyyy"
      sortKeyFields: ["dd"]
      queryField: "yyyqqqq"
    )

  status: attxxxxxx!
    @index(
      name: "xxxxxx"
      sortKeyFields: ["id"]
    )
    @index(
      name: "yyyyyy"
      sortKeyFields: ["dd"]
    )

に変更してpush後にattxxxxxxを全部消してpushしたら上手く消せた

対処2

xxxxx-cloudformation-template.jsonで現れないEnvironment variablesがteam-provider-info.jsonに残っている場合もこのエラーが出てきた。
team-provider-info.jsonのenv名から削除すれば出なくなった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0