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

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则