Comments (5)
I am also receiving null as a response from my aws lambda. The express app is not returning null.
from serverless-http.
Fixed this!!
@matttm you need to return the res from your handler.
doing context.res = tmp
doesn't cut it.
you need to return tmp
cc @whenmoon
module.exports.handler = async (context, req) => {
const tmp = await handler(context, req);
console.log('tmp', tmp);
// context.res = tmp;
return tmp
}
from serverless-http.
Yes, I am also experiencing this. Express app works fine locally, but routes return null
when deployed
from serverless-http.
It happened to me, too. When I switch from nodejs16.x
to nodejs18.x
from serverless-http.
guys, this is still an issue i am facing
I checked the logs, my express code is running as i can see logs for the lambda function
but api gateway just returns 200 status code with null, no matter what my lambda does
versions:
"serverless-http": "^3.2.0",
"express": "^4.18.2",
"node": "20.6.1",
is there anything I can do to help?
from serverless-http.
Related Issues (20)
- When using ALB and Lambda with multi value headers, regular headers are not being added to the multiValueHeaders object HOT 6
- serverless-http examples for Loopback HOT 1
- Using this library with AWS function URLs? HOT 3
- body-parser middleware not triggering in Express 5/body-parser 2.x HOT 2
- Cannot work with graphql, express-graphql or graphql-http
- Multiple `set-cookie` don't end up in the final response when an ALB is the trigger
- Integration with websockets HOT 1
- gRPC connect-es support
- Double logging since v3.1.1 HOT 1
- Is there a way to disable or replacing logging? HOT 1
- Xmlrpc support ? HOT 7
- How to properly wrap the http.createServer? HOT 4
- Streaming response HOT 5
- Use with Serverless Dashboard V2.0 and CLI V3 HOT 4
- {"message":"Missing Authentication Token"}
- Support Elysia.js
- Buffer in request.body
- Catch-all error handling with API GW?
- Is this repo still being maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-http.