I am trying to set up the simplest possible lambda non-proxy integrated endpoint and I am getting a 500 Gateway response from Api-Gateway and the logs show me the above API_CONFIGURATION_ERROR “Unable to transform request”. I had path parameters in my path and was trying to do this with async: True
but have since removed all that and am just trying to get a bare-bones endpoint up but am still failing.
The functions section of my serverless.yml looks like this:
functions:
foo:
handler: wsgi_handler.handler
timeout: 30
events:
- http:
method: any
path: '/{proxy+}'
authorizer: aws_iam
cors: true
bar:
name: ${self:service}-${env:ENV_CODE}-bar
handler: wsgi_handler.handler
events:
- http:
method: post
path: /bar/abc
integration: lambda
authorizer: aws_iam
request:
passThrough: WHEN_NO_MATCH
The API Gateway logs show me the above Integration Error
but I see nothing in the lambda logs. I’m using the serverless-wsgi
plugin and have manually put in logging statements at the first line of the handler function there but the lambda seems to not get triggered at all as there are no logs. I do want to point out I am using a custom version of the plugin and expect some error there but the request doesn’t seem to be getting that far at all.
My suspicion is that somehow the default request templates are failing to transform the request and I can’t understand why. I’m sending a normal post request with no body and tried both with and without a Content-Type: “application/json” header but have had no success.
I’ve tested this with the serverless framework versions 2.34.0
and 2.35.0
.
Really appreciate any thoughts on what might be causing this or any advice on how to debug this further.
Thanks!