learn-aws-lambda
learn-aws-lambda copied to clipboard
How to Access HTTP request headers in Lambda function?
see: http://stackoverflow.com/questions/31372167/how-to-access-http-headers-for-request-to-aws-api-gateway-using-lambda
You should enable MODEL TEMPLATE for your lambda function. It is locate in the API gateway service then in the section INTEGRATION request apply the default model template available in the drop down menu.
This worked for me: https://kennbrodhagen.net/2015/12/02/how-to-access-http-headers-using-aws-api-gateway-and-lambda/
Be sure to re-deploy the API Gateway with the new model setup
Which doesn't work for MIME messages when you have a flexible Content-Type as in Content-Type: multipart/related; boundary="----=_Part_0_1057468716.1585071599240"; type="application/soap+xml"; charset=UTF-8, as the model template requires a fixed Content-Type