はじめに
API gatewayのテストをしていると、
User: anonymous is not authorized to perform: execute-api:Invoke on resource: arn:aws:execute-api:
というエラーが出た。
原因
パーミッションエラー
対処
API gatewayの許可IPを確認する。
aws:SourceIpにIPを追加する。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": "*", "Action": "execute-api:Invoke", "Resource": "arn:aws:execute-api:*:*:*/*", "Condition": { "IpAddress": { "aws:SourceIp": [ "123.0.0.1", "1.23.4.1" ] } } } ] } |
参考情報
クラメソさん、いつもありがとうございます。