Connecting Through Mongo PrivateLink

Last updated on Jun 04, 2024

Hevo provides you with the option of connecting to your MongoDB Atlas cluster deployed in an AWS VPC using the AWS PrivateLink service. This option is available only under a business plan.

Note: Your MongoDB Atlas cluster must be in the same AWS region as your Hevo account.

As seen in the image below, to establish a connection through the AWS PrivateLink between the Hevo platform and your database, Hevo:

Mongo PrivateLink Architecture

  • Creates an intermediate VPC or uses an existing one.

  • Creates a VPC interface endpoint for your MongoDB Atlas cluster’s service endpoint.

  • Communicates with your MongoDB Atlas database through the VPC endpoints linked via the AWS PrivateLink.

The following image illustrates the steps for connecting your MongoDB Atlas Source database using an AWS PrivateLink. The steps are also described in the sections below.

Mongo PrivateLink Process Flow


To set up an AWS Mongo PrivateLink, you must contact Hevo Support. In response to your request, Hevo provides you with the following details:

  • VPC ID: The unique alphanumeric string assigned to Hevo’s intermediate VPC. For example, vpc-a1ab1aa1.

  • Subnet IDs: The unique alphanumeric strings assigned to the subnets associated with VPC. For example, subnet-8zzzyu00.

You need the VPC ID and subnet IDs while setting up a private endpoint for your MongoDB Atlas cluster.


Once you receive the details from Hevo, you need to configure a private endpoint for your MongoDB Atlas cluster. For this, perform the following steps:

Note: You should refer to the MongoDB Atlas documentation for the detailed steps.

  1. From the Atlas Control Plane in your MongoDB account, create an Atlas service endpoint in the region of your MongoDB Atlas cluster. This service endpoint accepts interface endpoint connections from Hevo.

    Note: Your MongoDB Atlas cluster must be in the same AWS region as your Hevo account.

  2. Configure a VPC interface endpoint using Hevo’s VPC ID and subnet IDs obtained in Step 1. This action generates the command to create the VPC interface endpoint.

  3. Copy the command generated above and provide it to Hevo Support.


Finalize the Private Endpoint

To connect using the AWS PrivateLink, you need to finish creating (finalizing) the private endpoint in your MongoDB account. This is a two-step process, and the first step is to be completed by Hevo.

1. Obtain the VPC Interface Endpoint ID and DNS Name

To finish creating the private endpoint, you require Hevo to create the VPC interface endpoint. For this, on receiving the command from you in Step 2, Hevo:

  1. Runs the command in Hevo’s AWS account to create the VPC interface endpoint. Once you finalize the private endpoint in the next step, this interface endpoint connects to the service endpoint created in Step 2.

  2. Provides you with the Endpoint ID and DNS name of the created VPC interface endpoint.

2. Create the Private Endpoint

To allow Hevo to connect to your MongoDB Atlas cluster, you must finalize the private endpoint in your MongoDB account. For this, based on your MongoDB Atlas cluster type, you need to use the following information from Step 1:

Cluster Type Required Information
Dedicated Cluster - VPC Interface Endpoint ID
Federated Database Instance / Online Archive - VPC Interface Endpoint ID

- DNS Name of the VPC Interface Endpoint

Refer to the MongoDB Atlas documentation for the detailed steps to finalize the private endpoint. Once you have done so, you should generate the required connection string for your MongoDB Atlas cluster.

Once you perform the steps above, you can configure your MongoDB Atlas cluster as a Source in Hevo. You can connect by specifying a connection string or manually providing the connection details. In the latter case, you need to provide the DNS name obtained in Step 3 as your Database Host.



Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Jun-04-2024 2.24 New document.

Tell us what went wrong