I have an AWS API Gateway, it’s a node serverless api, i have set the MONGO_URL like this:
mongodb+srv://<AWS access key>:<AWS secret key>@devcluster.6k6ngpc.mongodb.net/?authSource=%24external&authMechanism=MONGODB-AWS&retryWrites=true&w=majority&authMechanismProperties=AWS_SESSION_TOKEN:<session token (for AWS IAM Roles)>
However, I get this error when trying to access it from the api:
MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist
Is there a way to bypass this without allowing access from anywhere?