Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS DocumentDB with Robo 3T (Robomongo)

I want to connect Robo 3T (formerly robomongo) from my Mac laptop with AWS's DocumentDB. I followed numerous tutorials however could not find any specific to DocumentDB.

During the testing phase it passes step #1 "connected to my EC2 instance", however fails on step #2 with the message "failed to connect to ...docdb.amazonaws.com:27017 via SSH tunnel". Has anyone been able to get this to work?

like image 382
mediastream Avatar asked Jan 27 '19 01:01

mediastream


People also ask

How does robo 3T connect to DocumentDB?

Connecting using Robo 3T Open Robo 3T and choose Create. Copy the cluster endpoint from the cluster. On the Connection tab, enter the cluster endpoint information. On the Authentication tab, enter the authentication information for your cluster.

What is 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.

What is robomongo?

Robo 3T (formerly Robomongo) is the No. 34 repository on GitHub, written on C++. We are proud to have such community recognition, even when compared to world-famous projects, such as Google's LevelDB and Facebook RocksDB.

How to force Robo 3T to make databases visible to users?

Now, it is possible to specify the databases which will force Robo 3T to make them visible on Connection Settings > Authentication tab: Additionally, we have also implemented a warning message which is shown when the listdatabase command fails - to help the users know when to use this feature. 1.

How do I connect to Amazon DocumentDB on Amazon EC2?

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. Open Robo 3T and choose Create . On the Connection tab, in the Address field, enter the cluster endpoint information.


3 Answers

Steps to connect from Robo 3T

 1. Host : localhost and 28017: source port that we mentioned in ssh
    tunnel
 2. Authentication tab - Database : DBname; Username and password of
    the documentDb
 3. In SSL tab, click Use SSL protocol
 4. Click use CA certificate
 5. Import the CA certificate in .pem format. Download it from this link
    : https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
 6. Click on Advanced options and keep Invalid hostnames : Allowed
 7. Give a name for the connection and hit connect button.
 8. Connection should be established by now.

I assume you use the below command for SSH tunnel.

ssh -i "ec2Access.pem" -L 28017:sample-cluster.cluster-cu52jq5kfddg.us-east-1.docdb.amazonaws.com:27017 [email protected] -N 

Hope this will work.

like image 146
Arun Ramachandran Avatar answered Oct 11 '22 22:10

Arun Ramachandran


here is my config in five scree-shots. Connection Tab Authentication Tab SSH Tunnel SSL Advanced

like image 20
Micha Roon Avatar answered Oct 12 '22 00:10

Micha Roon


Via SSH-Tunnel on macOS this seems the way to got (fiddled around with the CA-pem without success before):

SSL settings macOS Robo 3T

like image 4
Strinder Avatar answered Oct 12 '22 00:10

Strinder