Connecting to an Amazon DocumentDB Cluster from Robo 3T
Robo 3T is a lightweight, open-source, shell centric, cross-platform graphical user interface tool for managing MongoDB workloads. Robo 3T gives you the ability to create databases, collections, add users, documents, execute one-time queries with auto-completion, and visualize results from a GUI interface.
Prerequisites
If you don’t already have an Amazon DocumentDB cluster running on Amazon EC2, follow the instructions on how to Connect with Amazon EC2.
If you don’t have Robo 3T, download and install it.
Connect with Robo 3T
Open Robo 3T and choose Create.
On the Connection tab, in the Address field, enter the cluster endpoint information.
Note
Can’t find your cluster endpoint? Just follow the steps here.
On the Authentication tab, check the box for Perform Authentication. Now enter the authentication information for your cluster. Make sure to use a custom database name like
test
. Usingadmin
(default setting) does not work for Amazon DocumentDB for clusters with no databases. Once you have created your first database you can modify your connection to useadmin
.![
Robo 3t console
](/projects/DocumentDB-20201111-en/69401297dbd4c0b3f8308013e559a6f9.png)
On the SSH tab, check the box for Use SSH tunnel, and add the SSH address, username, and private key/password of your EC2 instance. The SSH address is the public DNS of your EC2 instance.
In SSH Auth Method, choose one of the authentication methods.
- If you chose Private Key, then select the “…” button to open up the file finder and select the .pem file for your EC2 instance.
- If you chose Password, you must enter the SSH address, username and private key for your AWS EC2 instance. You can find this on the AWS EC2 console.
Note
Tip: If you are on Linux/macOS client machine, you might have to change the permissions of your private key using the following command:
> chmod 400 /fullPathToYourPemFile/<yourKey>.pem
Now choose the SSL tab and add the Amazon DocumentDB certificate.
Note
Don’t have the certificate? You can download it with the following command:
wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
Also in the SSL tab, check the box for Advanced Options. In the drop down menu for Invalid Hostnames, select Allowed.
Test the connection by choosing the Test button.
A Diagnostic window should appear with the test results. If everything is green, then close the box.
Now choose Save.
Now select your cluster and choose Connect.