AWS Lambda, NodeJs, MongoDb

I am creating a Lambda application with nodejs and mongodb, I managed to deploy and tested on aws, but I have a but, any lambda function that does not connect the database works normally, when I call a lambda function that uses the database it is trying to connect to the db until it gives timeout and after a while it says it has many active connections.

What can this be? I have to by some flag in command

sls deploy --region us-east-1 --stage dev

Author: Wilber Silva, 2020-05-12