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개 답변
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠