question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support AWS Lambda

See original GitHub issue

It’s hard to use the actual processRequest for Lambda because it does not give me a request, response model to follow to write a middleware. I’ve rewritten it to accept an event given in exports.handler = async (event, context) => {}

https://gist.github.com/samin/976271f97b03bba14017a760570df88a

Would it be possible to add it?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
vaunuscommented, Aug 16, 2021

@federicobarera sorry I meant we’re setting the Apollo handler up like this:

const handler = apolloServer.createHandler({
  expressAppFromMiddleware(middleware) {
    const app = express()
    app.use(graphqlUploadExpress())
    app.use(middleware)
    return app
  }
})

In Apollo v3 the above is all that is required for graphql-upload to work in a lambda.

0reactions
piyushk96commented, Apr 13, 2022

Thanks @koresar for the update. But the original graphql-upload package just worked for me. There was a mistake in my code due to which the Upload scalar’s resolver was not executing and I was getting the wrong input format. I can confirm @vaunus that graphql-upload works out of the box with apollo v3 with aws lambda using @vendia/serverless-express

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lambda runtimes - AWS Documentation
Lambda supports multiple languages through the use of runtimes. For a function defined as a container image, you choose a runtime and the...
Read more >
AWS Lambda – FAQs
AWS Lambda natively supports Java, Go, PowerShell, Node.js, C#, Python, and Ruby code, and provides a Runtime API which allows you to use...
Read more >
AWS Lambda adds support for Node.js 18
AWS Lambda now supports Node.js 18 as both a managed runtime and a container base image. Developers creating serverless applications in ...
Read more >
Runtime Maintenance in Lambda - Security Overview of AWS ...
AWS Lambda provides support for multiple programming languages through the use of runtimes, including Java 11, Python 3.8, Go 1.x, NodeJS 12, ....
Read more >
Contact us - AWS
AWS Lambda specialists are available to answer questions and discuss how we can help your organization. You'll hear back from us within one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found