Connection to private RDS from different VPC's

0

We wish to be able to have our RDS instance NOT have a public address, but want to be able to connect to it from ec2 instances across all of our VPC's and accounts. I would do VPC peering to solve this, but the problem is that the VPC's cidr blocks overlap.
What is the best way to solve this?

質問済み 1年前889ビュー
3回答
0

If you wanted too, you could ensure your RDS's are on an Infrastructure/Internal subnet as such. This means they would be on a subnet that does not have a default route to any IGW or NAT Device. You can also add extra layer of protection on the subnet to limit access to internal networks also.

If you still need to connect to an overlapping VPC then the only option is Private NAT Gateway. See Enable communication between overlapping networks on attached link https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-scenarios.html

Another option, is to readdress your overlapping VPC. Create a new VPC that’s not overlapping and then back and restore your RDS into the new subnet group.

profile picture
エキスパート
回答済み 1年前
profile picture
エキスパート
レビュー済み 1年前
0

Another option to consider is adding non-overlapping IPv6 CIDRs to your VPCs, and connect the VPCs via TGW routing only IPv6, not IPv4. Then your EC2 instances can connect with RDS over IPv6.

エキスパート
回答済み 1年前
0

The best way to do this is not to have overlapping IP addresses - in the long run, that is by far the least expensive and complex solution: https://aws.amazon.com/blogs/networking-and-content-delivery/connecting-networks-with-overlapping-ip-ranges/

However, you might consider using PrivateLink although I'd note that there is extra cost here: https://aws.amazon.com/blogs/database/access-amazon-rds-across-vpcs-using-aws-privatelink-and-network-load-balancer/

profile pictureAWS
エキスパート
回答済み 1年前

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

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

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

関連するコンテンツ