
AWS VPC Peering Lab
A practical infrastructure project demonstrating that VPC peering is not transitive in AWS. Built with Terraform to test and prove this networking limitation through real connectivity testing across 3 VPCs with EC2 instances.
Infrastructure
- 3 VPCs: Connected via peering (A↔B, B↔C, no direct A↔C link)
- EC2 Instances: One in each VPC for connectivity testing
- Route Tables: Configured to demonstrate the non-transitive limitation
Key Learning
- Non-Transitive Nature: A to B works, B to C works, but A to C times out
- AWS Limitation: Peering connections only link the two VPCs they were created between
- Network Layer: AWS never adds transitive routes to route tables
Architecture
- Modular Terraform: 3 modules (vpc, peering, ec2)
- One Command Deployment:
terraform apply - One Command Teardown:
terraform destroy
Testing
SSH into each instance and ping across peering connections:
- ✓ A ↔ B: Successful
- ✓ B ↔ C: Successful
- ✗ A ↔ C: Timeout (expected behavior)
Stack
- Infrastructure: Terraform
- Cloud: AWS (VPC, EC2)
- Networking: VPC Peering, Route Tables
- Language: HCL (HashiCorp Configuration Language)