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

MongoDB Atlas Connection

  • Dark
    Light
  • 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
atlas_9.png

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

atlas_11.png

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

Connect to Mongo Atlas using Private Endpoint (Optional)

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

  2. On Cloud Provider - Choose AWS and click Next
    PL2.png

  3. Choose Region.
    PL3.png


Rivery supports PrivateLink in the next regions:

On console.rivery.io:

  • us-east-1
  • us-east-2
  • us-west-2
    On eu-west-1.console.rivery.io
  • 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:
    PL_4.png

  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:
    image.png

Step 2 - Retrieve A Connection String

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

atlas_1.png

  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:
    image.png

  2. Then, select Connect your application
    atlas_3.png

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

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

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.
    image.png

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

    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 -
    atlas_7.png

  2. Test your credentials by pressing Test Connection

  3. Save your connection


Was this article helpful?