Connecting to endpoints - Amazon DocumentDB

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: