MongoDB connections from AWS Lambda using mangum as adapter #227
Unanswered
himalacharya
asked this question in
Q&A
Replies: 1 comment
-
Have you found a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With reference to example, I have used in my project. For my project, I am using MongoDb but faces new connection for every time lambda function is invoked. I looked in Mongodb documentation (https://docs.atlas.mongodb.com/best-practices-connecting-from-aws-lambda/) that connection to Mongodb server should be outside lambda function.
Using example provided in documentation how to define client outside lambda function? All of my Database connection and query is above this
handler = Mangum(app)
Beta Was this translation helpful? Give feedback.
All reactions