Close
logodocs

Amazon DocumentDB

This feature set is currently in closed-access beta. Functionality and documentation may change. Please contact your Customer Success Manager if interested in this beta!

This guide explains how to add Amazon DocumentDB, a MongoDB-compatible document database, as a resource in strongDM.

Limitations

  • The DocumentDB Datasource supports username/password authentication. It does not support IAM or AWS Directory Service authentication.
  • DocumentDB requires TLS to connect.
  • DocumentDB does not support connection using service (SRV) records.
  • When creating a DocumentDB (replica set mode) resource, the Hostname field must be set with the hostnames and ports of all instances in the replica set separated by commas (e.g., primary0:27017,replica1:27017,replica2:27017).
  • AWS Directory Service integration is not supported.

Configuration Properties

strongDM offers two DocumentDB Datasource types: DocumentDB (replica set mode), for connecting to specified replica instances in your cluster; and DocumentDB (single host mode), for connecting to only the primary instance in your cluster.

To configure DocumentDB in either replica set mode or single host mode, first see our main guide, Add a Datasource, for general information on adding a Datasource in the Admin UI. Then set the properties for your selected DocumentDB type.

DocumentDB (replica set mode)

Add Datasource Dialog for Amazon DocumentDB (replica set mode)
Add Datasource Dialog for Amazon DocumentDB (replica set mode)
  • Display Name (Required): Enter a meaningful name for this resource. This name will be displayed in the Admin UI.
  • Datasource Type (Required): Select DocumentDB (replica set mode).
  • Hostname (Required): Enter the hostnames and ports of all instances in the replica set. The host addresses and ports of all replica instances must be separated by commas (e.g., primary0:27017,replica1:27017,replica2:27017).
  • Port Override: After you click create, the port override will be filled in with a port between 1024-59999 that is not in use by another resource. You can change the port override later in Settings > Port Overrides.
  • Authentication Database (Required): Enter the name of the DocumentDB authentication database (e.g., “admin”).
  • Username (Required): Enter the username (e.g., “administrator@example.com”) used for authentication to DocumentDB.
  • Password (Required): Enter the password used for authentication to DocumentDB.
  • Replica Set (Required): Enter the name of the DocumentDB replica instance.
  • Connect to Replica? (Optional): When this option is selected, strongDM will connect to a read-only replica instance instead of the primary instance.
  • Resource Tags (Optional): Assign tags to this Datasource by entering key-value pairs in the format <KEY>=<VALUE> (e.g., env=dev, region=east, etc.).

DocumentDB (single host mode)

Add Datasource Dialog for Amazon DocumentDB (single host mode)
Add Datasource Dialog for Amazon DocumentDB (single host mode)
  • Display Name (Required): Enter a meaningful name for this resource. This name will be displayed in the Admin UI.
  • Datasource Type (Required): Select DocumentDB (single host mode).
  • Hostname (Required): Enter the instance endpoint for your DocumentDB cluster (e.g., sample-instance.123456789012.us-east-1.docdb.amazonaws.com:27017).
  • Port (Required): The default port is 27017.
  • Port Override: After you click create, the port override will be filled in with a port between 1024-59999 that is not in use by another resource. You can change the port override later in Settings > Port Overrides.
  • Authentication Database (Required): Enter the name of the DocumentDB authentication database (e.g., “admin”).
  • Username (Required): Enter the username (e.g., “administrator@example.com”) used for authentication to DocumentDB.
  • Password (Required): Enter the password used for authentication to DocumentDB.
  • Resource Tags (Optional): Assign tags to this Datasource by entering key-value pairs in the format <KEY>=<VALUE> (e.g., env=dev, region=east, etc.).

Test the Connection

After you have created the DocumentDB Datasource, you can use the MongoDB Shell to test the connection to DocumentDB.

  1. Run the following command to connect to the instance running on your localhost:
    mongosh "mongodb://localhost:<PORT>/admin"

    Example:
    mongosh "mongodb://localhost:37018/admin"

  2. Once connected, execute the following command to see the databases:
    show dbs

If any errors occur, please copy them into an email and send them to support@strongdm.com.

Previous
Add a Datasource
Next
Amazon Elasticsearch