How to use Mongoid with Lambda Execution Context?

Hello, I’m trying to use Mongoid with my Jets application, but I’m facing issues with the Connection Pool.

I have followed the instructions from this post:
https://community.rubyonjets.com/t/where-to-load-mongoid/461/2

But my connections to the database go through the roof.

So, as mentioned in the docs, here:
https://rubyonjets.com/docs/database/activerecord/

With ActiveRecord, Jets uses the Lambda Execution Context to have a centralized connection pool to the database.

How can I achieve the same using Mongoid?

Thanks!
Andres