Using AWS Lambda + API Gateway for generation of vector map tiles - Getting "Malformed Lambda proxy response" error

168 views Asked by At

I am using AWS lambda which generates vector tiles. Tiles are being send in format

return {
    body: data,
    isBase64Encoded: true,
    statusCode: 200,
    headers: {
      "Content-Type": "application/octet-stream",
      "Access-Control-Allow-Origin": "*"
    }
  }

My data object is in octet-stream format.

My API Gateway

  • is using integration proxy
  • response headers has 'Content-Type'
  • Content-Type is set for 'application/octet-stream'
  • In settings > Binary media type is set - application/octet-stream

Functionality of the lambda is expected to work fine. Problem is in sending response back. I am still getting the error

Execution failed due to configuration error: Malformed Lambda proxy response

0

There are 0 answers