New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP API requires 'integration' to conform with V2 payload syntax #1097
Comments
I noticed if I return an object from a httpApi with v2 event format, serverless-offline returns an empty response but if I deploy the same code to lambda the object appears in the response. Maybe related. |
@lmmattr / @revmischa you might try v6.8.0 which just added AP gateway v2 paylod support with #1092 |
@bryantbiggs hey just tried installing v.6.8.0. The issue still persists |
adding |
@lmmattr your |
@ljwagerfield its the handler output that's different between those two. |
@lmmattr you should try with https://www.serverless.com/framework/docs/providers/aws/events/http-api#event--payload-format |
Bug Report
https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
The docs for the v2 payload say i can return an object from a function but that doesn't work by default. I have to specify
integration: lambda
in the serverless config file for it to work.Sample Code
Does not work
Output:
nothing
Works 1
Output:
Works 2
Output:
You also get a warning in the log output of serverless:
Expected behavior/code
You should be able to return an object without having to specify the integration key.
The text was updated successfully, but these errors were encountered: