Pymongo lib import is slow

create an AWS Lambda layer containing the pymongo package. AWS lambda layer allows you to reuse the code across the multiple function, reducing cold start time by preloading the dependencies.

1 Like