When running the testvia console of the AWS API Gateway, I see that the output response from the lambda function is correctly converted:
{
"type" : "",
"message" : "",
"request-id" : ""
}
See the logs below:
Tue Sep 06 14:46:06 UTC 2016 : Endpoint request body after transformations: {}
Tue Sep 06 14:46:06 UTC 2016 : Endpoint response body before transformations: {"errorMessage":"501stef"}
Tue Sep 06 14:46:06 UTC 2016 : Endpoint response headers: {x-amzn-Remapped-Content-Length=0, x-amzn-RequestId=a4540f42-7440-11e6-90ce-214b29fcde38, Connection=keep-alive, Content-Length=26, Date=Tue, 06 Sep 2016 14:46:06 GMT, Content-Type=application/json}
Tue Sep 06 14:46:06 UTC 2016 : Method response body after transformations: {
"type" : "",
"message" : "",
"request-id" : ""
}
Tue Sep 06 14:46:06 UTC 2016 : Method response headers: {Content-Type=application/json}
Tue Sep 06 14:46:06 UTC 2016 : Successfully completed execution
Tue Sep 06 14:46:06 UTC 2016 : Method completed with status: 501
However, when calling the API through Postman with headers:
Content-Type : application/json
Accept : application/json

There is no output conversion, and the output JSON message is true:
{
"errorMessage": "501stef"
}
Partially associated with the Amazon APi gateway, it cannot generate a converted request , but they talk about Request in this .
source
share