繁体   English   中英

如何将 AWS Elastic Bean Stalk 连接到 DocumentDB

[英]How to connect AWS Elastic Bean Stalk to DocumentDB

我正在尝试从 Elastic Bean Stalk node.js 实例连接到 DocumentDB 实例。

添加允许传入 27017 连接的安全组后,我能够通过 Cloud9 连接到集群。

Dec 23 21:39:06 ip-172-31-21-195 web: const timeoutError = new error_1.MongoServerSelectionError(`Server selection timed out after ${serverSelectionTimeoutMS} ms`, this.description);
Dec 23 21:39:06 ip-172-31-21-195 web: ^
Dec 23 21:39:06 ip-172-31-21-195 web: MongoServerSelectionError: Server selection timed out after 30000 ms
Dec 23 21:39:06 ip-172-31-21-195 web: at Timeout._onTimeout (/var/app/current/node_modules/mongodb/lib/sdam/topology.js:285:38)

我尝试创建一个安全组,允许端口 27017 上的传入连接,并尝试将其附加到 EC2 实例和 DocumentDB 集群。

您必须确保已提供双向访问权限。 您是否已阅读此页面的详细信息: https ://docs.aws.amazon.com/documentdb/latest/developerguide/connect-ec2.html?

您是否尝试过从实例本身连接?

mongo --ssl host docdb-2022-02-08-14-15-11.cluster.region.docdb.amazonaws.com:27107 --sslCAFile rds-combined-ca-bundle.pem --username demoUser --password

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM