LoginSignup
0
0

More than 1 year has passed since last update.

amplify push と戦う2

Last updated at Posted at 2022-11-20

症状の確認方法

amplify pushで出てくるメッセージではあんまり役に立たないので以下の方法で確認する

amplify>アプリ>Backend environments>環境のアクション>詳細を表示>最新のデプロイアクティビティ>CloudFormation
イベントタグを選択する
(状況の理由に「User Initiated」があるのでそれが、push開始っぽい)

症状1

Resource handler returned message: "1 validation error detected: Value '[xxxxxxxArn]' at 'layers' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 140, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: (arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+)|(arn:[a-zA-Z0-9-]+:lambda:::awslayer:[a-zA-Z0-9-_]+), Member must not be null] (Service: Lambda, Status Code: 400, Request ID: xxxxxxx)" (RequestToken: xxxxxxxxxx, HandlerErrorCode: InvalidRequest)

対処

レイヤーのarnが変更されて存在が無くなったっぽいので、amplify update functionでlayerの更新をする

症状2

Embedded stack arn:aws:cloudformation:ap-northeast-1:なんかID:stack/なんかID/なんかID was not successfully created: No export named 〜〜〜〜GraphQLAPIIdOutput:GetAtt:テーブル名Table:Name found

対処

templateがおかしくなった??

amplifi update function
関数選択>権限が出るので

Resource access permission
- xxxxxxxx (create, read, update, delete)
- xxxxxxxx:@model(appsync) (create, read, update, delete)
- xxxxxxxx:@model(appsync) (create, read, update, delete)
- xxxxxxxx:@model(appsync) (create, read, update, delete)
- xxxxxxxx (create, read, update, delete)

権限をメモしておく。

Resource access permissionsを選んでエンター
xxxxxxTableを外してpush

amplifi update function
関数選んで
メモした権限を復活

症状3

Parameters: [storagexxxxxxxxBucketName] do not exist in the template

対処

templateがおかしくなった??

amplifi update function
Resource access permissionsを選んでエンター連打で終わらせる
これだけで、更新されるらしい

症状4

Parameters: [unauthRoleName, authRoleName] must have values

The following resource(s) failed to create: [functiondecodingBarcode]. The following resource(s) failed to update: [apixxxxxxx, authuserPoolGroups].

対処

追加したばかりの関数をamplify push function xxxxxxで発生する
amplify push したら出なかった。
追加したばかりの場合はamplify pushしないとダメらしい

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