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?

demandé il y a un an889 vues
3 réponses
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
EXPERT
répondu il y a un an
profile picture
EXPERT
vérifié il y a un an
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.

EXPERT
répondu il y a un an
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
EXPERT
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions