AWS Lambda deployment support #6806
Replies: 1 comment 1 reply
-
I haven’t started the keystone portion of my project yet, but my goal will be the same: running keystone on AWS Lambda. Unfortunately, those bundle sizes a real pain—they cannot be changed and are an AWS hard limit. Rather than dealing with crazy bundling methods or having to cut out portions of my project, I just use serverless container images https://www.serverless.com/blog/container-support-for-lambda since the problem never really goes away. It’s like having an smartphone or computer lacking the necessary storage space and having to constantly delete old apps or videos That said, dependencies like Thanks for the example with |
Beta Was this translation helpful? Give feedback.
-
Hi:
I am trying to deploy keystonejs-next to a AWS Lambda function using the
createExpressServer
from@keystone-next/keystone/system
and the libraryserverless-http
. I have this handler which works fine locally replying to HTTP calls to /api/graphql simulating a Lambda environment.The problem I am seeing is when I try to deploy this to Lambda the node_modules is about ~500MB exceeding the maximum package size of 250MB.
I am trying different options like using webpack to create a minified bundle or to manually remove all the dependencies related to
next
or the admin ui but it's difficult to know which dependencies can actually be removed.Is there an option to just have the headless graphql endpoint removing all the admin ui not needing in that environment? Thanks and happy to help with the development.
Beta Was this translation helpful? Give feedback.
All reactions