带有 Robo 3T (Robomongo) 的 AWS DocumentDB

AWS DocumentDB with Robo 3T (Robomongo)

我想将 Mac 笔记本电脑上的 Robo 3T(以前称为 robomongo)与 AWS 的 DocumentDB 连接起来。我遵循了许多教程,但是找不到任何特定于 DocumentDB 的教程。

在测试阶段,它通过了第 1 步 "connected to my EC2 instance",但在第 2 步失败并显示消息 "failed to connect to ...docdb.amazonaws.com:27017 via SSH tunnel"。有没有人能让这个工作?

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

我假设您对 SSH 隧道使用以下命令。

ssh -i "ec2Access.pem" -L 28017:sample-cluster.cluster-cu52jq5kfddg.us-east-1.docdb.amazonaws.com:27017 ubuntu@ec2-34-229-221-164.compute-1.amazonaws.com -N 

希望这会奏效。

这是我在五张屏幕截图中的配置。

这似乎是通过 macOS 上的 SSH-Tunnel 获得的方法(之前尝试过 CA-pem 但没有成功):

对于那些仍然被问题困扰的人,https://aws.amazon.com/blogs/database/part-3-getting-started-with-amazon-documentdb-using-robo-3t/

提供了详细的指南

一个重要的注意事项是用于 SSH 隧道的 EC2 和 DocumentDB 集群必须在同一个 VPC 中(如果它们打开了所需的端口(例如 22 和 27017),则不一定是同一个安全组)。此外,您应该创建一个测试数据库并插入至少一个文档,以便从

开始设置 Robo3T 连接的身份验证

“在“身份验证”选项卡上,输入集群的身份验证信息。确保使用自定义数据库名称,如“test”或“testdb”。使用“admin”(默认设置)不适用于 DocumentDB没有数据库的集群。创建第一个数据库后,您可以修改连接以使用“admin”。

希望对您有所帮助!!