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
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ