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 年前檢視次數 1389 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南