Hello developers!
Hey, does Anyone face a MongoDB connection error/issue on AWS lambda?
and if you know the solution, please help me, guys!
my code works perfectly in my local system!
But when I try to post, using the API gateway endpoint, MongoDB disconnect! ( session time-out error )
Tech things 🛠️:
- aws lambda
- aws api gateways
- serverless
- node js [16.x]
- azure cosmos DB ( MongoDB )
Top comments (1)
guys, I got it!
db.js -> way 1
db.js -> way 2
index.js
credits goes to: brnaba
stackoverflow.com/users/19408037/b...
refer this!
stackoverflow.com/questions/743141...