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?

preguntada hace un año888 visualizaciones
3 Respuestas
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
EXPERTO
respondido hace un año
profile picture
EXPERTO
revisado hace un año
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.

EXPERTO
respondido hace un año
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
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas