Advertisement
Intermediate AWS, VPC & Networking

How does VPC Peering enable private network communication between two separate VPCs, and what are its limitations?

Short answer

VPC Peering creates a direct, private network connection between two VPCs, allowing resources in either VPC to communicate with each other using private IP addresses as if they were part of the same network, but it does not support transitive routing, meaning if VPC A is peered…

Save AWS mock interview
Advertisement
AModel answer
VPC Peering creates a direct, private network connection between two VPCs, allowing resources in either VPC to communicate with each other using private IP addresses as if they were part of the same network, but it does not support transitive routing, meaning if VPC A is peered with VPC B, and VPC B is peered with VPC C, resources in VPC A cannot automatically communicate with VPC C through that chain, which is a common limitation that leads larger organizations toward using a Transit Gateway instead for more complex, multi VPC networking needs.
Example

aws ec2 create-vpc-peering-connection --vpc-id vpc-11111 --peer-vpc-id vpc-22222

Real-world example
A company connects its application VPC with a separate shared services VPC containing a central logging system using VPC Peering, but later needs to adopt a Transit Gateway once they have more than a handful of VPCs needing interconnected communication, since peering alone would require an impractical number of individual connections.
Likely follow-ups
  • What is the maximum number of VPC peering connections a single VPC can have?
  • At what point does an organization typically outgrow VPC Peering in favor of Transit Gateway?
Related topics