Connecting to endpoints - Amazon DocumentDB
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Connecting to endpoints

When you have your endpoint, either cluster or instance, you can connect to it using the mongo shell or a connection string.

Connecting using the mongo shell

Use the following structure to construct the string that you need to connect to your cluster or instance using the mongo shell:

mongo shell examples

Connect to a cluster:

Connect to an instance:

Connecting using a connection string

Use the following structure to construct the connection string that you need to connect to your cluster or instance.

Connection string examples

Connect to a cluster:

Connect to an instance: