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 年前

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

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

回答問題指南