serverless / examples

Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more.
https://www.serverless.com/examples/
Other
11.45k stars 4.47k forks source link

aws-node-mongodb-atlas code outdated #793

Open docwarems opened 3 months ago

docwarems commented 3 months ago

handler.js uses client.isConnected(); this results in runtime error I upgraded to current "mongodb" npm 6.8.0 According to research client.connect() is a no-op if already connected, so I just removed the client.isConnected() condition.

Also the MongoDB Atlas URL seems to be wrong today - at least it doesn't match mine. I just replaced it.

Last but not least, serverless.yml sets nodejs14x runtime, which is no longer supported.

I'm going to provide a PR with these minor fixes.

docwarems commented 3 months ago

https://github.com/serverless/examples/pull/794