Reputation: 91
I am receiving the following error in conjunction with a 502 on my API-Gateway.
Endpoint response body before transformations: <AccessDeniedException>
<Message>Unable to determine service/operation name to be authorized</Message>
</AccessDeniedException>
After some testing, this problem seems to only appear on endpoints that use Authorizer Lambdas. The authorizer successfully completes and all transformations occur, then the request is sent to the lambda.
Current Setup: Using AWS-SAM with a nested stack
Things I've tried:
Manually adding permissions to the lambda via aws-cli with no response.
Including Invoke Permissions as described by https://github.com/awslabs/serverless-application-model/issues/59
My current 'work-around' is to manually go into the API-Gateway -> Integration Request, then selecting the edit Lambda Function and checking the box (without any changes). After I do this, the problem doesn't arise again until I build the stack from scratch again.
Upvotes: 4
Views: 3418
Reputation: 91
Looks like the issue was with out API Swagger yml file. As indicated in the docs, x-amazon-apigateway-integration MUST be a POST for lamba integrations.
Upvotes: 5