I want to call an AWS API Gateway Endpoint
that is protected with AWS_IAM
using the generated JavaScript API SDK
.
What access permissions does the role of the Cognito Identity have? Make sure it has access to perform execute-api:Invoke
on your API.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"execute-api:Invoke"
],
"Resource": [
"arn:aws:execute-api:us-east-1::/*/POST/graphql"
]
}
]
}
You can get the exact resource ARN from the method settings page in the web console.