My AWS Lambda function is executing successful until it returns the response. It is a proxy integration. The below image shows the sample response sent. It complies with the output format of proxy integration. But still it returns 502 code and Internal Server Error. In Cloudwatch logs, no error was logged for this.
This shows the response which is meant for returning. enter image description here
I tried a simple CRUD operation and expected 200 on the success case. But it is returning 502 irrespective of the successful function