Hey mate, I understand you, and I've been where u're at. Heheheh
I lost a lot of time trying to implement it and I finally found a useful way of doing it, it's not the optimal way of doing it but it works pretty well..
Since I'm not using Serverless as the framework, I'm using ClaudiaJS deploying a full ExpressJS application. For every request recieved I do connect to the database and disconnect from the database. (using middleware)
The problem that I was facing with mongoose was that I was unable to keep a connection, I've tried several things and none but this worked.
(I've done it before with serverless also but that was before the new version of it and it's not useful anymore)
Github project(under development) link: https://github.com/TCEES-NTI/SAPO