Getting a 502 error on AWS lambda
Sun Mar 25 03:39:12 UTC 2018 : Endpoint response body before transformations: {"status":200,"body":"{\"Items\":[],\"Count\":0,\"ScannedCount\":1}","isBase64Encoded":false,"headers":{"content-type":"application/json"}}
Using stringify to my body and add the status, headers, and isBase64Encodeded properties.
I have tried varying the headers and making them empty as well.
Why do i get this error?
The lambda code i am using is as follows:
    var response = {
        status : 200,
        body : JSON.stringify(data),
        isBase64Encoded : false,
        headers : {"content-type" : "application/json"}
    }
    console.log(response)
    callback(null, response);