4 ms·
For MongoDB specifically see the best practices docs for Lambda (https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda/ https://www.mongodb.com/docs/
by alexbevi 3y ago
For MongoDB specifically see the best practices docs for Lambda (https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda/ https://www.mongodb.com/docs/atlas/manage-connections-aws-la...).
This outlines creating the handler outside the function context to allow the client to be reused between invocations.