I am hitting an intermittent issue with a lambda taking binary inputs where AWS API gateway throws a 500 error before my lambda gets run.

X-Ray did nothing for me. The only relevant information is if you enable detailed logging:

Execution failed due to configuration error: Unable to transform request

Various mentions/discussion of this:

The final resource above is telling in that PRs were not merged.

Initially comparing the output between a working endpoint and non working one showed a big difference:

aws apigateway --region us-east-1 get-integration --rest-api-id <ID> --resource-id <ID> --http-method POST

I redeployed the non working one with async set to false, and the two command outputs from just above now matched, but it did not seem to fix the issue, but when I waited some time and ran the test again it succeeded.

ApiGatewayIssue (last edited 2024-03-02 21:13:39 by narrator)