MongoDB Atlas Connection
  • 1 Minute to read
  • Dark
  • PDF

MongoDB Atlas Connection

  • Dark
  • PDF

Article Summary

Create MongoDB Atlas Connection


Step 1 - Whitelist Rivery's IP's In Your Mongo Instance

1.In your MongoDB Atlas account - Go to Network Access and Click on Add IP Adresses

2.Whitelist the following IP's in your Mongo Instance -


After Whitelisting the IP's, the outcome result will be the following -

Connect to Mongo Atlas using Private Endpoint (Optional)

  1. Under Database Network, choose Private Endpoint and click on Add Private Endpoint:

  2. On Cloud Provider - Choose AWS and click Next

  3. Choose Region.

Rivery supports PrivateLink in the next regions:


  • us-east-1
  • us-east-2
  • us-west-2
  • eu-west-1
  • eu-central-1

  1. Wait for a while until the endpoint will be available, and a green v is shown up.
    After that, copy the command aside, and get the --service-name value:

  2. Provide the service-name to your Rivery Account Manager or to the Support team. In this step, Rivery internally will make a handshake with your Mongo Atlas Private Endpoint, and should provide you a VPC-Endpoint-ID, with the next format: vpce-XXXXXXXXXXXXXXX

  3. Paste the VPC Endpoint ID in the right place and click on Create:

Step 2 - Retrieve A Connection String

  1. In your MongoDB Atlas account - Go to Databases, choose your database and Click on Connect


  1. If Private Endpoint created on Step 1, choose Private Endpoint as connection method, and also choose the Private Endpoint you've created on Step 1:

  2. Then, select Connect your application

  3. Lastly, copy the URL shown in the screen, and paste aside.

And Change the <username> and <password> to {username} and {password} and change the MyFirstDatabase to the database name you want to connect to:

Step 3 - Setting-Up The Connection At The Rivery Console

  1. In Rivery, go to Connections - > New Connection
  2. Choose MongoDB from the sources
  3. Give a name to your connection.
  4. Entre your Atlas Username and Password

Screenshot 2022-01-23 184720.png

  1. Next, Build the connection URI: by clicking on Edit and paste the URI changed in Step 2.

    4.Press on the "v" to save the URI -

    5.(optinal) In case you want to change your DataBase dynamically, add the Database name to the dedicated field above the connection URI, and use the {database} variable in the the connection itself -

  2. Test your credentials by pressing Test Connection

  3. Save your connection

Was this article helpful?