2017-10-16 5 views
1

同様の質問がありますが、私が試した回答があります。 何が間違っているのか分かりませんが、助けてくれれば助かります。AWS APIゲートウェイエラー:APIゲートウェイにS3プロキシとして提供された役割を引き受ける権限がありません

実験の詳細: enter image description here

メソッド実行のテストからのエラー。 PUTリクエスト:

Execution log for request test-request 
Mon Oct 16 10:13:47 UTC 2017 : Starting execution for request: test-invoke-request 
Mon Oct 16 10:13:47 UTC 2017 : HTTP Method: PUT, Resource Path: /pop-data-xmlz/test.xml 
Mon Oct 16 10:13:47 UTC 2017 : Method request path: {item=test.xml, folder=pop-data-xmlz} 
Mon Oct 16 10:13:47 UTC 2017 : Method request query string: {} 
Mon Oct 16 10:13:47 UTC 2017 : Method request headers: {Content-Type=application/xml} 
Mon Oct 16 10:13:47 UTC 2017 : Method request body before transformations: <test> 
test string 
</test> 
Mon Oct 16 10:13:47 UTC 2017 : Request validation succeeded for content type application/json 
Mon Oct 16 10:13:47 UTC 2017 : Execution failed due to configuration error: API Gateway does not have permission to assume the provided role 
Mon Oct 16 10:13:47 UTC 2017 : Method completed with status: 500 

私はS3のチュートリアル(http://docs.aws.amazon.com/apigateway/latest/developerguide/integrating-api-with-aws-services-s3.html)に、APIゲートウェイ以下とPUT要求を実行しようとしています。

APIゲートウェイはus-east-1にあり、S3バケットはus-east-2にあります。

作成役割:APIGatewayProxyCustom

ポリシー(POP-日付取り込み)をS3バケットに対してPUT要求を可能に取り付けられています。 enter image description here

答えて

8

が、これはあなたのIAMでロールに行くと「信頼関係」タブを選択し直すには: enter image description here

役割は、信頼関係が設定されています。ここからポリシーを編集し、プリンシパルサービスの場合は、下記のように「apigateway.amazonaws.com」を追加します。これにより、API Gatewayは、既存のラムダ権限に加えて、関数を実行する役割を引き受けることができます。

{ 
 
"Version": "2012-10-17", 
 
"Statement": [ 
 
{ 
 
"Effect": "Allow", 
 
"Principal": { 
 
"Service": ["apigateway.amazonaws.com","lambda.amazonaws.com"] 
 
}, 
 
"Action": "sts:AssumeRole" 
 
} 
 
] 
 
}

+1

どうもありがとうございました!私が狂ってしまうのを止めた。もう一度、公式の文書はこれについて言及していません。 –

+0

あなたは大丈夫です@CliveSargeant。知っておくと助かります:) –

+0

ありがとうございます!!!! –

関連する問題