How to Peer between VPCs in Different Regions for AWS

Prev Next
WHAT TO EXPECT
In order to successfully do Peering Connections between VPCs in different regions on AWS, a user must configure their route tables to allow traffic between instances. This will ensure that packets destined for a specific network segment on the other region/VPC/subnet are correctly routed.

In this article, users will learn how to Create a Peering Connection between Different Regions, Modify Route Tables and Edit Subnet Associations. Step 2 and 3 of the process will need to be repeated for both regions. 

STEP ONE: Create a Peering Connection between Different Regions

  1. Go to the VPC Dashboard and select Peering Connections
  2. Click Create peering connectionAWS-Peering_Create-Peering-Connections
  3. Edit the following in the Create peering connection form: 
    1. Set a descriptive name. In the example, the user lists the connection between VPCs from Oregon and N. Virginia. 
    2. Select the VPC of the instance you want to connect from. 
    3. Select Another Region and select the destination region from the dropdown menu. 
    4. Enter the VPC ID of the target VPC in the target region. 
    5. Add any tag needed for organization purposes. AWS-Peering_create-peering-form
  4. Click Create peering connection. A new Peering Connection should now be listed for the region you're on. Please note: A "mirrored connection" will be created on the "destination" region. It must be accepted manually to be active. AWS-Peering_create-peering-complete
  5. Change to the other region. 
  6. Go to Peering Connections
  7. Select the new Peering Connection listed as "Pending acceptance." AWS-Peering_peering-request
  8. Under the Actions dropdown, select Accept requestAWS-Peering_accept-request

STEP TWO: Modify Route Tables in Both Regions

Once the peering connections are created, the route table must be modified in both regions. Start with the 1st region and complete STEP TWO and STEP THREE.

  1. Go to the VPC Dashboard
  2. Click on Route tables in the Virtual private cloud section. 
  3. Select Create route table button.AWS-Peering_route-tables
  4. Edit the following in the Create route table form: 
    1. Enter a descriptive name. 
    2. Select the correct VPC. 
    3. Add any necessary tags. AWS-Peering_route-tables-form
  5. Select Create route table
  6. Select the Route table ID of the route table you just created. AWS-Peering_route-table-id
  7. Select Edit routes button the next screen. AWS-Peering_edit-routes
  8. Add the Destination by entering the CIDR of the destination network. 
  9. Under Target, select the recently created Peering Connection from the list.AWS-Peering_edit-routes-form
  10. Click the Save changes button. 
Internet Access
If you need the agents to have access to the internet, you will also need to add the route for the 0.0.0.0/0 towards the NAT gateway. 

STEP THREE: Edit Subnet Associations

  1. Select Subnet associations tab. 
  2. Select Edit subnet associations button under the Explicit subnet associations box.AWS-Peering_edit-subnet-associations 
  3. Select the subnet(s) of the instance that must be connected to the destination. AWS-Peering_edit-subnet-associations-form
  4. Click the Save associations button. 
Security Groups
It is important that security groups on each EC2 and on each Subnet on both Regions match and should both encompass the port exceptions listed in the cloudSwXtch System Requirements article. 

Repeat STEP TWO and THREE for the Other Region