AWS lambda api gateway error “Malformed Lambda proxy response”

824    Asked by AkanshaChawla in SQL Server , Asked on Nov 30, -0001

I am trying to set up a hello world example with AWS lambda and serving it through API gateway. I clicked the "Create a Lambda Function", which set up the API gateway and selected the Blank Function option. I added the lambda function found on AWS gateway getting started guide:

exports.handler = function(event, context, callback) {

  callback(null, {"Hello":"World"});  // SUCCESS with message

};

The issue is that when I make a GET request to it, it's returning back a 502 response { "message": "Internal server error" }. And the logs say "Execution failed due to configuration error: Malformed Lambda proxy response".


Your Answer

Interviews

Parent Categories