Connection Timeout Issue with DocumentDB

0

I created an EC2 instance and a DocumentDB cluster, they belong to different VPC ID, from the document https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-from-outside-a-vpc.html , to directly connect to DocumentDB (access port 27017), I need to use the EC2 instance running in the same VPC as DocumentDB cluster, there's no way to do it because the VPN running DocumentDB is not showing up in my VPC list, can anyone tell me how resolve this issue? ncat ( nc -zv <documentdb hostname> 27017) returned timeout error

已提问 1 年前1293 查看次数
1 回答
1
已接受的回答

If the EC2 instance is in another VPC - VPC Peering may be a better way to connect privately without the overhead of a VPN. https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html

There is a cost associated with VPC peering. If possible you might consider snapshotting your EC2 instance into a custom AMI and launching it in the same VPC as your DB Cluster, it can be in a different subnet. This way you would save on the VPC peering costs.

profile pictureAWS
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则