Using an AWS RDS instance across multiple VPC

2.6k views Asked by At

I have one VPC with an RDS instance in it. They are both located in the same region.

I want to use the RDS instance in another VPC, that is in another region on another AWS account (we have multiple AWS accounts). If that's not complicated enough the 2nd VPC comes up via CloudFormation (i.e. dynamic). Whenever I am bringing up a CloudFormation stack I want to attach the RDS instance automatically.

I have looked at:

  • exposing the RDS instance on the public internet :(
  • an ELB w/ TCP transport to put the database instance behind
  • VPC peering but the different regions and the approval workflow in the AWS console make little sense in the case we are using CloudFormation

All of these seem suboptimal to me and was wondering if somebody already did this before. If yes, please share what you did and what the though process behind it was.

2

There are 2 answers

3
jarmod On BEST ANSWER

Use a VPN tunnel from one VPC to the other. You could build your own or look at Vyatta. Ideally the two VPCs do not have overlapping CIDRs. Note that you cannot use VPC peering inter-region.

0
domderen On

For anyone who stumbles around here, it looks like AWS VPC Peering can now be done cross region: https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html