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

Connect with Robo 3T

  1. Open Robo 3T and choose Create.

    Connect Using Robo 3T - 图1

  2. On the Connection tab, in the Address field, enter the cluster endpoint information.

    Connect Using Robo 3T - 图2

    Note

    Can’t find your cluster endpoint? Just follow the steps here.

  3. 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. Using admin (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 use admin.

    ![

    1. Robo 3t console
    2. ](/projects/DocumentDB-20201111-en/69401297dbd4c0b3f8308013e559a6f9.png)
  4. 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.

    Connect Using Robo 3T - 图3

  5. 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

  6. Now choose the SSL tab and add the Amazon DocumentDB certificate.

    Connect Using Robo 3T - 图4

    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

  7. Also in the SSL tab, check the box for Advanced Options. In the drop down menu for Invalid Hostnames, select Allowed.

    Connect Using Robo 3T - 图5

  8. Test the connection by choosing the Test button.

    Connect Using Robo 3T - 图6

  9. A Diagnostic window should appear with the test results. If everything is green, then close the box.

    Connect Using Robo 3T - 图7

  10. Now choose Save.

  11. Now select your cluster and choose Connect.