Using Custom Authorizers with AWS Service Integrations

0

I am trying to use a custom authorizer to return an id with restricted aws service access (as indicated by Approach 2 in the initial response in this forum post: https://forums.aws.amazon.com/thread.jspa?threadID=230067).

I want to restrict the user to a List operation on specific S3 bucket/folder using the Javascript api in the browser.

The docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-method-integration.html#cfn-apigateway-method-integration-credentials suggest that
setting the method execution role to arn:aws:iam:::user/ will enable the api method to use the current callers identity (which I assume is returned by the custom authorizer)

However when I try and configure a method like this in the console I get the following error in a nice red box at the top of the console:
Caller provided credentials are only supported for Lambda, SNS, SQS, DynamoDB, and S3.

The AWS Service drop down is set to Simple Storage Service (S3).

Why won't this work?

已提问 5 年前445 查看次数
1 回答
1

Note that the Exution Role should have been arn:aws:iam::**:user/** not arn:aws:iam:::user/ as shown below due to code formatting.

Anyhoo, after returning to this and attempting to to define a new API action integrating with a AWS service from scratch I got the following message:

AWS_IAM Auth type is required for AWS integrations with identity forwarding specified

Naturally searching for this statement generated absolutely nothing so in a rare moment of inspiration occasioned by a cup of coffee I tried:

arn:aws:iam::<my aws account>:user/*

And lo and behold the waters parted and the save button worked!

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则