Egress PrivateLink Endpoint Setup: MongoDB Atlas on AWS for Confluent Cloud¶
This topic presents the steps for configuring the MongoDB Atlas Sink connector in Confluent Cloud with AWS PrivateLink and Egress PrivateLink Endpoint.
Prerequisites¶
The following is a list of prerequisites for configuring the MongoDB Altas connector with an Egress PrivateLink Endpoint:
- A Confluent Cloud Dedicated cluster was set up and is running within an AWS PrivateLink network.
- A Dedicated MongoDB Atlas database was created to sink data into and is running within the same region and cloud as the Confluent Cloud cluster.
- A source topic was created to sink data into MongoDB Atlas.
Step 1. Create a MongoDB Private Endpoint¶
In MongoDB, create a Private Endpoint for for your Dedicated MongoDB Atlas database:
Go to Network Access → Private Endpoint → Dedicated Cluster.
Click Add Private Endpoint.
Select the applicable cloud provider and region of your Dedicated MongoDB Atlas database.
Make a note of the Atlas Endpoint Service name which will be required for creating a Confluent Cloud Egress PrivateLink Endpoint.
You can close the workflow for now. You will edit the rest of the configuration after you create a VPC endpoint ID in Confluent Cloud.
Step 2. Create an Egress PrivateLink Endpoint¶
In the Confluent Cloud Console, in the Network Management tab of the desired Confluent Cloud environment, click the Confluent Cloud network you want to add the PrivateLink Endpoint to. The Connection Type of the network needs to be “PrivateLink Access”.
Click Create endpoint in the Egress connections tab.
Click the service you want to connect to, specifically, MongoDB.
Follow the guided steps to specify the field values, including:
Name: Name of the PrivateLink Endpoint.
PrivateLink service name: The name of the PrivateLink service you retrieved in Obtain AWS PrivateLink Service name.
Create an endpoint with high availability: Check the box if you wish to deploy an endpoint with High Availability.
Endpoints deployed with high availability have network interfaces deployed in multiple availability zones.
Click Create to create the PrivateLink Endpoint.
If there are additional steps for the specific target service, follow the prompt to complete the tasks, and then click Finish.
Once the state of the Egress PrivateLink Endpoint changes from Provisioning to Pending, make a note of the Endpoint ID. The value is required to finish setting up a private endpoint for MongoDB Atlas.
Step 3. Configure the MongoDB private endpoint¶
In the MongoDB console, click Edit for the previously created MongoDB private endpoint.
Click Next.
In Your VPC Endpoint ID field, specify the Endpoint ID associated with your Confluent Cloud Egress PrivateLink Endpoint, and click Save.
You can enter the Endpoint ID in the MongoDB console as shown below:
Once Endpoint Status changes to “Available”, you are ready to create the Confluent Cloud MongoDB Sink connector.
Step 4. Create the MongoDB Atlas Sink connector¶
Specify the authentication details for MongoDB.
In the MongoDB Atlas console, click Database under Deployment.
Click Connect for the associated database → Private Endpoint → Shell.
Get the endpoint.
In Confluent Cloud, specify the MongoDB credentials during the connector creation steps.
In the Connection host field, specify the endpoint you retrieved in the previous step.
Note
When you configure a private endpoint, ensure that the standard hostname has “-pl-0” appended to its first part, as shown in the screen below.
Follow the steps to create the source connector or the sink connector in Confluent Cloud.