Difference between the payloads here: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
API Gateway HTTP APIs (which have lower cost and latency compared to the standard API Gateway REST APIs) use this model by default, and aws-serverless-express doesn't work with it right now
Note: for those who can't wait for this to be implemented -- you can manually select the old payload format by setting PayloadFormatVersion to "1.0" on the event in CloudFormation: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-httpapi.html#sam-function-httpapi-payloadformatversion
For example:
MyFunction:
Type: AWS::Serverless::Function
Properties:
# ...
Events:
SomeEvent:
Type: HttpApi
Properties:
PayloadFormatVersion: "1.0"
A PR for this issue can be found at: https://github.com/vendia/serverless-express/pull/302
Available in v4
Most helpful comment
Note: for those who can't wait for this to be implemented -- you can manually select the old payload format by setting
PayloadFormatVersionto"1.0"on the event in CloudFormation: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-httpapi.html#sam-function-httpapi-payloadformatversionFor example: