Calling an AWS Lambda via API Gateway with the Lambda Proxy Integration option, you might see an HTTP 502 response and this message:
“Execution failed due to configuration error: Malformed Lambda proxy response"
Wed May 30 05:00:41 UTC 2018 : Execution failed due to configuration error: Malformed Lambda proxy response
Wed May 30 05:00:41 UTC 2018 : Method completed with status: 502
This is a rather cryptic message, but it’s saying is the response is not in the expected format.
Per this doc, the expected response should be in this format:
{ "isBase64Encoded": true|false, "statusCode": httpStatusCode, "headers": { "headerName": "headerValue", ... }, "body": "..." }