logo

kobevino

VPC Peering

Sun, Aug 24, 2025

Peering Connection

VPC Peering allows two VPCs to communicate with each other. Since VPCs can be placed in different regions for security, I will demonstrate connecting two VPCs across regions.

Create Personal VPC

New VPC

  1. Create a new VPC to use different IP range.

Create Subnet Subnet Setting

  1. Configure each subnet.

Internet Gateway Attach VPC

  1. Create a new internet gateway and attach to VPC.

Create Route Table Edit subnet Association Edit Route

  1. In the end, Create route table and edit subnet association and route.

Create two EC2 Instances in different regions.

Then, create an EC2 instance in each region, each running a web server. For one of the instances, select the VPC that we created earlier.

For example)

  • Seoul Server Private IPv4 addresses : 10.0.6.38
  • Osaka Server Private IPv4 addresses : 172.31.39.92

Ping Server

They can't communicate with each other. Now, I will configure Peering Connections.

Peering Connection

Create Peering Connection Accept Peeringonnection

Choose another VPC to peer with, and then go to Peering Connections in the region where you made the request and accept it.

Route Table Route Table

Configure the range of private IPv4 addresses to be used in another region.

Ping Success

Now, the two servers in different regions can communicate with each other.

Wrap Up

VPC Peering is a powerful way to connect isolated networks without going through the public internet. If your infrastructure spans multiple VPCs or regions, peering provides a secure and low-latency option for communication.