1 Answer
- Newest
- Most votes
- Most comments
1
Best practices are similar to what you would do when connecting to another data store: declare the variable holding the connection to the database outside your handler so it can be re-utilized by subsequent invocations of your function.
You can find a good example here: https://docs.atlas.mongodb.com/best-practices-connecting-to-aws-lambda.
answered 3 years ago
Relevant content
- asked 2 years ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 8 months ago