For the Kinesis stream, I created a proxy API using the AWS API Gateway. I added a special authorizer using python Lambda for proxies. After publishing the lambda function and deploying the API, I was able to successfully test the API using the Gateway Test functionality. I could see the logs in cloudwatch that had detailed fingerprints from a custom lambda authentication function. After successful authentication, the API gateway moved the entry to my Kinesis stream
However, when I call the same API from the Chrome Postman client, I get 500 Internal Server Error , and the response headers include X-Cache -> Error from the cloud interface, x-amzn-ErrorType -> AuthorizerConfigurationException
The Lambda auth function returns a policy that allows a request to be made to my API. Return Policy Document:
{
"policyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "execute-api: Invoke",
"Resource": [
"arn: aws: execute-api: us-east-1: 1234567: myapiId / staging / POST / *"
],
"Effect": "Allow"
}
]
},
"principalId": "Foo"
}
Why does the request fail from Chrome or curls, but does the same API test work fine with the Gateway API?
source share