Apollo Server Lambda: Sharing Context Across Lambdas #4683
Unanswered
matthew-valenti
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can the Apollo Server Lambda context variable be shared across Lambdas?
Our sys-ops team wants to split resolvers across lambdas so that specific lambdas are given permissions to only the resources they need e.g. a specific S3, Kinesis, Secrets Manager etc.
Our Apollo Server Lambda is currently monolithic and we assign all permissions needed across all resolvers on the one Apollo Server lambda.
I know I can use the AWS SDK to invoke another Lambda (and pass basic parameters) but then this other lambda is now outside Apollo Server so doesn't have direct access to datasources, shared database connections, user authentication/authorization data etc.
If Apollo Federation is the solution -- is it "light" enough? e.g. We might have 10 lambdas, which each one loading Apollo Server to run one small resolver function.
Beta Was this translation helpful? Give feedback.
All reactions