nav-img
Advanced

VPC Peering Connection Usage Examples

A VPC peering connection is a networking connection between two VPCs in the same region and enables them to communicate. Table 1 lists different scenarios of using VPC peering connections.

Table 1 VPC peering connection usage examples

Location

CIDR Block

Description

Example

VPCs in the same region

  • VPC CIDR blocks do not overlap.
  • Subnet CIDR blocks of VPCs do not overlap.

You can create VPC peering connections to connect entire CIDR blocks of VPCs. Then, all resources in the VPCs can communicate with each other.

VPCs in the same region

  • VPC CIDR blocks overlap.
  • Some subnet CIDR blocks overlap.

You can create VPC peering connections to connect specific subnets or ECSs from different VPCs.

  • To connect specific subnets from two VPCs, the subnet CIDR blocks cannot overlap.
  • To connect specific ECSs from two VPCs, each ECS must have a unique private IP address.

VPCs in the same region

  • VPC CIDR blocks overlap.
  • All subnet CIDR blocks overlap.

VPC peering connections are not usable.