Docs Menu
Docs Home
/
MongoDB Atlas
/ /

Manage and Connect from Private Endpoints

On this page

  • Required Access
  • Connect from a Private Endpoint
  • View Private Endpoints
  • Remove a Private Endpoint from Atlas

Note

This feature is not available for M0 free clusters, M2, and M5 clusters. To learn more about which features are unavailable, see Atlas M0 (Free Cluster), M2, and M5 Limits.

After you set up a private endpoint for a cluster or set up a private endpoint for a serverless instance, follow these steps to manage and connect from your Atlas private endpoints.

To learn more about using private endpoints with Atlas, see Learn About Private Endpoints in Atlas.

To view private endpoints, you must have Project Read Only access to the project.

To delete private endpoints, you must have Project Owner access or higher to the project.

Users with Organization Owner access must add themselves to the project as a Project Owner.

Important

For considerations about private endpoint-aware connection strings, see Private Endpoint-Aware Connection Strings.

Use a private endpoint-aware connection string to connect to an Atlas cluster with the following procedure:

1
  1. If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Clusters page is not already displayed, click Database in the sidebar.

    The Clusters page displays.

2

Click Connect for the cluster to which you want to connect.

3
4
5

Important

Skip this step if Atlas indicates in the Setup connection security step that you have at least one database user configured in your project. To manage existing database users, see Configure Database Users.

To access the cluster, you need a MongoDB user with access to the desired database or databases on the cluster in your project. If your project has no MongoDB users, Atlas prompts you to create a new user with the Atlas Admin role.

  1. Enter the new user's Username.

  2. Enter a Password for this new user or click Autogenerate Secure Password.

  3. Click Create Database User to save the user.

Use this user to connect to your cluster in the following step.

Once you have added a database user, click Choose Your Connection Method.

6
1
  1. If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Clusters page is not already displayed, click Database in the sidebar.

    The Clusters page displays.

2

Click Connect for the cluster to which you want to connect.

3
4
5

Important

Skip this step if Atlas indicates in the Setup connection security step that you have at least one database user configured in your project. To manage existing database users, see Configure Database Users.

To access the cluster, you need a MongoDB user with access to the desired database or databases on the cluster in your project. If your project has no MongoDB users, Atlas prompts you to create a new user with the Atlas Admin role.

  1. Enter the new user's Username.

  2. Enter a Password for this new user or click Autogenerate Secure Password.

  3. Click Create Database User to save the user.

Use this user to connect to your cluster in the following step.

Once you have added a database user, click Choose Your Connection Method.

6

To return the details of the AWS private endpoint you specify using the Atlas CLI, run the following command:

atlas privateEndpoints aws describe <privateEndpointId> [options]

To list all AWS private endpoints in a project using the Atlas CLI, run the following command:

atlas privateEndpoints aws list [options]

To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas privateEndpoints aws describe and atlas privateEndpoints aws list.

To return the AWS private endpoint interface that you specify. using the Atlas CLI, run the following command:

atlas privateEndpoints aws interfaces describe <interfaceEndpointId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints aws interfaces describe.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2

Click Dedicated Cluster for a private endpoint for your dedicated Atlas cluster. (default)

To return the details of the Azure private endpoint you specify using the Atlas CLI, run the following command:

atlas privateEndpoints azure describe <privateEndpointId> [options]

To list all Azure private endpoints in a project using the Atlas CLI, run the following command:

atlas privateEndpoints azure list [options]

To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas privateEndpoints azure describe and atlas privateEndpoints azure list.

To return the Azure private endpoint interface that you specify. using the Atlas CLI, run the following command:

atlas privateEndpoints azure interfaces describe <privateEndpointResourceId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints azure interfaces describe.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2

Click Dedicated Cluster for a private endpoint for your dedicated Atlas cluster. (default)

To return the details of the Google Cloud private endpoint you specify using the Atlas CLI, run the following command:

atlas privateEndpoints gcp describe <privateEndpointId> [options]

To list all Google Cloud private endpoints in a project using the Atlas CLI, run the following command:

atlas privateEndpoints gcp list [options]

To learn more about the syntax and parameters for the previous commands, see the Atlas CLI documentation for atlas privateEndpoints gcp describe and atlas privateEndpoints gcp list.

To return the Google Cloud private endpoint interface that you specify. using the Atlas CLI, run the following command:

atlas privateEndpoints gcp interfaces describe <id> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints gcp interfaces describe.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2

Click Dedicated Cluster for a private endpoint for your dedicated Atlas cluster. (default)

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2

Click Serverless Instance to set up a private endpoint for your Atlas serverless instance.

3

Click the Create New Endpoint button.

4
  1. From the Serverless Instance dropdown, select the serverless instance you want to connect using a private endpoint. The cloud provider and region for the serverless instance populate automatically.

  2. Click Confirm. Atlas begins allocating the endpoint service, which might take several minutes to complete. You can continue to the next steps while Atlas allocates the endpoint service.

5

Click the AWS logo, then click Next.

6
  1. Enter your VPC Endpoint ID. This is a 22-character alphanumeric string that identifies your private endpoint. Find this value on the AWS VPC Dashboard under Endpoints > VPC ID.

  2. Click Create.

7

For each resource that needs to connect to your Atlas clusters using AWS PrivateLink, the resource's security group must allow outbound traffic to the interface endpoint's private IP addresses on all ports.

See Adding Rules to a Security Group for more information.

8

This security group must allow inbound traffic on all ports from each resource that needs to connect to your Atlas clusters using AWS PrivateLink:

  1. In the AWS console, navigate to the VPC Dashboard.

  2. Click Security Groups, then click Create security group.

  3. Use the wizard to create a security group. Make sure you select your VPC from the VPC list.

  4. Select the security group you just created, then click the Inbound Rules tab.

  5. Click Edit Rules.

  6. Add rules to allow all inbound traffic from each resource in your VPC that you want to connect to your Atlas cluster.

  7. Click Save Rules.

  8. Click Endpoints, then click the endpoint for your VPC.

  9. Click the Security Groups tab, then click Edit Security Groups.

  10. Add the security group you just created, then click Save.

To learn more about VPC security groups, see the AWS documentation.

9
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

10

You can connect to an Atlas cluster using the AWS PrivateLink private endpoint when all of the resources are configured and the private endpoint becomes available.

To verify that the AWS PrivateLink private endpoint is available:

On the Private Endpoint tab, select a cluster type and verify the following statuses for the region that contains the cluster you want to connect to using AWS PrivateLink:

Atlas Endpoint Service Status
Available
Endpoint Status
Available

To learn more about possible status values, see Troubleshoot Private Endpoint Connection Issues.

If you do not see these statuses, see Troubleshoot Private Endpoint Connection Issues for additional information.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2

Click Serverless Instance to set up a private endpoint for your Atlas serverless instance.

3

Click the Create New Endpoint button.

4
  1. From the Serverless Instance dropdown, select the serverless instance you want to connect using a private endpoint. The cloud provider and region for the serverless instance populate automatically.

  2. Click Confirm. Atlas begins allocating the endpoint service, which might take several minutes to complete. You can continue to the next steps while Atlas allocates the endpoint service.

5

Click the AWS logo, then click Next.

6
  1. Enter your VPC Endpoint ID. This is a 22-character alphanumeric string that identifies your private endpoint. Find this value on the AWS VPC Dashboard under Endpoints > VPC ID.

  2. Click Create.

7

For each resource that needs to connect to your Atlas clusters using AWS PrivateLink, the resource's security group must allow outbound traffic to the interface endpoint's private IP addresses on all ports.

See Adding Rules to a Security Group for more information.

8

This security group must allow inbound traffic on all ports from each resource that needs to connect to your Atlas clusters using AWS PrivateLink:

  1. In the AWS console, navigate to the VPC Dashboard.

  2. Click Security Groups, then click Create security group.

  3. Use the wizard to create a security group. Make sure you select your VPC from the VPC list.

  4. Select the security group you just created, then click the Inbound Rules tab.

  5. Click Edit Rules.

  6. Add rules to allow all inbound traffic from each resource in your VPC that you want to connect to your Atlas cluster.

  7. Click Save Rules.

  8. Click Endpoints, then click the endpoint for your VPC.

  9. Click the Security Groups tab, then click Edit Security Groups.

  10. Add the security group you just created, then click Save.

To learn more about VPC security groups, see the AWS documentation.

9
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

10

You can connect to an Atlas cluster using the AWS PrivateLink private endpoint when all of the resources are configured and the private endpoint becomes available.

To verify that the AWS PrivateLink private endpoint is available:

On the Private Endpoint tab, select a cluster type and verify the following statuses for the region that contains the cluster you want to connect to using AWS PrivateLink:

Atlas Endpoint Service Status
Available
Endpoint Status
Available

To learn more about possible status values, see Troubleshoot Private Endpoint Connection Issues.

If you do not see these statuses, see Troubleshoot Private Endpoint Connection Issues for additional information.

To delete the AWS private endpoint you specify using the Atlas CLI, run the following command:

atlas privateEndpoints aws delete <privateEndpointId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints aws delete.

To delete the AWS private endpoint interface you specify using the Atlas CLI, run the following command:

atlas privateEndpoints aws interfaces delete <interfaceEndpointId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints aws interfaces delete.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2
  1. Click the Private Endpoint tab.

  2. Next to the private endpoint you want to remove, click Terminate.

  3. To confirm, click Confirm in the dialog box.

To delete the Azure private endpoint you specify using the Atlas CLI, run the following command:

atlas privateEndpoints azure delete <privateEndpointId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints azure delete.

To delete the Azure private endpoint interface you specify using the Atlas CLI, run the following command:

atlas privateEndpoints azure interfaces delete <privateEndpointResourceId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints azure interfaces delete.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2
  1. Click the Private Endpoint tab.

  2. Next to the private endpoint you want to remove, click Terminate.

  3. To confirm, click Confirm in the dialog box.

To delete the Google Cloud private endpoint you specify using the Atlas CLI, run the following command:

atlas privateEndpoints gcp delete <privateEndpointId> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints gcp delete.

To delete the Google Cloud private endpoint interface you specify using the Atlas CLI, run the following command:

atlas privateEndpoints gcp interfaces delete <id> [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas privateEndpoints gcp interfaces delete.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2
  1. Click the Private Endpoint tab.

  2. Next to the private endpoint you want to remove, click Terminate.

  3. To confirm, click Confirm in the dialog box.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2
  1. Click the Private Endpoint tab.

  2. Next to the private endpoint you want to remove, click Terminate.

  3. To confirm, click Confirm in the dialog box.

1
  1. If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.

  2. If it's not already displayed, select your project from the Projects menu in the navigation bar.

  3. In the sidebar, click Network Access under the Security heading.

    The Network Access page displays.

2
  1. Click the Private Endpoint tab.

  2. Next to the private endpoint you want to remove, click Terminate.

  3. To confirm, click Confirm in the dialog box.

Back

Serverless Instances