Connecting to an Amazon DocumentDB Cluster from Robo 3T - Amazon DocumentDB
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

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.

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

    注意

    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.

    
               Robo 3t console
  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.

  5. In SSH Auth Method, choose one of the authentication methods.

    • If you chose 私有密钥, 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.
    注意

    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 click the drop down menu for Authentication Method. Choose Use CA Certificate. Select Advanced Options and for the Invalid Hostnames menu, select Allowed.

    注意

    If you are on macOS Catalina or above, choose Self-signed Certificate as the Authentication Method because the macOS does not accept certificates with validity greater than 825 days.

  7. Test the connection by choosing the Test button.

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

  9. Now choose Save.

  10. Now select your cluster and choose Connect.