Skip to main content
Version: v2

How to use AWS VPC Peering?

AWS VPC Peering allows two different VPCs to connect through Private IP without allowing RDS/EC2 to be accessed by the public network. Make sure your needs meet the VPC peering limitations before starting.

First, you must ensure that Canner Enterprise and your source VPC exist. Assume that your VPC information is as follows:

(Please make sure to replace the VPC information with your VPC information; the following information is only for demonstration)

Notice: CIDRs of two VPCs cannot be the same.

  • Canner Enterprise VPC
ID: vpc-db3e09bc
CIDR: 172.31.0.0/16
Account: 365545700901
  • DataSource VPC
ID: vpc-08279f19bf4d9f74a
CIDR: 10.3.0.0/16
Account: 956019317291

We must enable Canner Enterprise VPC to connect to DataSoruce VPC through the EC2 instance.

VPC on Canner Enterprise

  1. Go to the VPC - Peer Connections screen, and click Create Peering Connection.

1_Peering_Connections___VPC_Management_Console

  1. Create a peering connection request.
    • 2.1 Define a new name for the peering connection.
    • 2.2 Select Canner Enterprise's VPC.
    • 2.3 Fill in the account id with the account id of the data source VPC.
    • 2.4 [optional] If two VPCs are in two different Regions, select
    • 2.5 Fill in the VPC id of the data source VPC.

2_Create_Peering_Connection___VPC_Management_Console

  1. Set Route table.
    • 3.1 Navigate to VPC > Route Tables.
    • 3.2 Choose the route tables of VPC.
    • 3.3 Navigate to the Routes tab.
    • 3.4 Click Edit routes.

3_Route_Tables___VPC_Management_Console

  1. Add route, use data source VPC CIDR as the destination, and choose the peering connection we created as the target.

4_Edit_routes___VPC_Management_Console

VPC on the source

  1. Navigate to VPC > Peering Connections, choose and accept the request we created from Canner VPC.

5_Peering_Connections___VPC_Management_Console

  1. Navigate to VPC > Route Tables, choose the route tables of VPC, then click Edit routes.

6_Route_Tables___VPC_Management_Console

  1. Add route, use Canner Enterprise VPC CIDR as the destination, and choose the peering connection we created as the target.

7_Edit_routes___VPC_Management_Console

  1. Update security groups roles of your EC2/RDS, accept connection from Canner Enterprise VPC CIDR, and specify target port.

8_EC2_Management_Console

After completing all the settings, Canner Enterprise will use the private IP instance node to obtain data from your data sources.