I'm trying to find a proxy tool for MongoDB to use with my serverless functions that connect to MongoDB Atlas. The issue I'm facing is that the IPs for my serverless functions aren't static, so I can't whitelist them for network access on MongoDB Atlas. I need to set up a proxy that has a static outbound IP. I tried using Mongobetween, but it doesn't support any authentication, which is a bit risky. Does anyone know of a good proxy tool or method to handle this situation?
3 Answers
Where are your serverless functions hosted? Depending on that, you may have different proxy options available to you.
You might want to check out MongoDB Atlas's private endpoint feature. It allows you to securely connect your resources to MongoDB without exposing your IP. Here's a link to their documentation: https://www.mongodb.com/docs/atlas/security-private-endpoint/
Thanks, I'll definitely look into that!
Consider setting up a VPN, a custom proxy with authentication, or using a cloud NAT gateway to provide a static IP for securely routing your serverless functions to MongoDB Atlas. That way you can maintain security while solving the IP issue.

They're running on Azure.