MongoDB Atlas connection
Creating MongoDB Atlas connection
Procedure
Step 1 - Whitelist Data Integration IP's in your Mongo instance
- In your MongoDB Atlas account, Go to Network Access and click Add IP Adresses.
- Whitelist the following IPs in your Mongo instance.

After Whitelisting the IP addresses, the result is shown:

Connecting to Mongo Atlas using private endpoint (Optional)
Using Private Endpoint for connecting to Mongo Atlas is accessible to users on the Enterprise plan.
-
Under Database Network, choose Private Endpoint and click on Add Private Endpoint.
-
On Cloud Provider, Choose AWS and click Next.
-
Choose Region. Data Integration 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-1On il-central-1.console.rivery.io:
il-central-1On ap-southeast-2.console.rivery.io:
ap-southeast-2Wait for a while until the endpoint is available, and a green v is displayed.
-
Copy the command, and get the
--service-namevalue. -
Provide the
service-nameto your Data Integration Account Manager or to the Support team. Data Integration internally connects with your Mongo Atlas Private Endpoint, and provides you a VPC-Endpoint-ID in the format:vpce-XXXXXXXXXXXXXXX -
Paste the VPC Endpoint ID in the right place and click on Create.
Step 2 - Retrieving a connection string
- In your MongoDB Atlas account, go to Databases, choose your database and click Connect.
- If Private Endpoint was created on Step 1, choose Private Endpoint as the connection method, and also choose the Private Endpoint you have created.
- Select Connect your application.
- Copy the URL shown on the page, and paste it.
And change the
<username>and<password>to{username}and{password}, and change the MyFirstDatabase to the database name you want to connect to.
Formatting MongoDB Connection Strings Correctly. When connecting to MongoDB Atlas clusters, ensure the connection string includes the +srv prefix. This prefix enables the use of DNS SRV records for cluster discovery and connection configuration.
- Incorrect:
mongodb://shilohrajk:hxbTHdLfPZKAVR2v@cluster0.ksugj.mongodb.net:27017/sample_mflix
- Correct:
mongodb+srv://shilohrajk:hxbTHdLfPZKAVR2v@cluster0.ksugj.mongodb.net/sample_mflix
Using the +srv format prevents DNS-related and authentication issues, ensuring a reliable connection to your MongoDB Atlas cluster.
Step 3 - Setting up the Connection at the Data Integration console
- Provide a Connection Name.
- Configure the Host, Port (default: 27017), and Database.
The database name must be in lowercase.
- Enter your Username and Password.
- Specify your URI.
- Click Test Connection to verify your credentials.
- Save your connection by clicking Save.