What is VPC Peering in AWS?

VPC Peering is a networking connection between two Amazon VPCs (Virtual Private Clouds) that allows them to communicate privately as if they were in the same network.
🔹 Why Use VPC Peering?
Private Communication: Resources in different VPCs can talk to each other without using the internet.
High Performance & Low Latency: It runs on the AWS backbone network, making it fast and secure.
Cross-Account & Cross-Region Support: You can link up VPCs in different AWS accounts and even in different regions (thanks to inter-region peering).
No Single Point of Failure: It's a direct connection between VPCs, so you don't have to rely on a third-party service.
🔹 How VPC Peering Works?
Request Peering: The owner of VPC A sends a peering request to the owner of VPC B.
Accept Peering: The owner of VPC B accepts the request.
Update Route Tables: Both VPCs must update their route tables to allow traffic to flow between them.
Communication Enabled: Resources (EC2, RDS, etc.) in both VPCs can now communicate.
🔹 Example: VPC Peering Setup
Imagine you have two VPCs:
VPC A (10.0.0.0/16) - N.Virginia
VPC B (192.168.0.0/16) - OHIO
To enable communication:
Create a VPC Peering connection.
Accept the peering request.
Update VPC A’s route table to point traffic for
192.168.0.0/
16 to VPC B.Update VPC B’s route table to point traffic for
10.0.0.0/16
to VPC A.Now try to ping each other (server ) on to their private ip.
🔹 Key Limitations of VPC Peering
No Transitive Peering: If VPC A is peered with VPC B, and VPC B is peered with VPC C, then VPC A & C cannot communicate. You’d need a direct peering connection.
No Overlapping CIDRs: The CIDR blocks of the VPCs must be unique (cannot overlap).
Manual Route Updates: You must manually update route tables in both VPCs.
🔹 Alternative to VPC Peering
✅ AWS Transit Gateway – A better option for managing multiple VPCs at scale, allowing centralized routing instead of multiple peering connections.
Thanks for reading .Please follow me on LinkedIn@iam-tarunpandey-devops .
Subscribe to my newsletter
Read articles from Tarun Pandey directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Tarun Pandey
Tarun Pandey
Hey there! Great to see you here. I’m actively exploring new technologies in DevOps and sharing my insights through articles. If you find something valuable, feel free to check out my other profiles and show some love! Take care, and see you on the other side! 🚀