Task Statement 3.3: Optimize AWS networks for performance, reliability, and cost-effectiveness.
📘AWS Certified Advanced Networking – Specialty
1. What is VPC Peering?
VPC Peering is a direct network connection between two VPCs only.
Key idea:
- One connection = one pair of VPCs
- Traffic is private and stays within AWS backbone
- No central router or hub
Important characteristics:
- Works only between two VPCs at a time
- Does NOT support transitive routing (A → B → C is not allowed)
- Low latency because traffic is direct
- Simple to configure for small environments
✅ When VPC Peering is appropriate
Use VPC Peering when:
1. Small number of VPCs
If you only have:
- 2 VPCs
- or a few VPCs with limited connections
👉 Example use case:
- Dev VPC needs access to QA VPC
- Two application teams need private communication
2. Simple one-to-one communication
When VPCs only need to talk directly and do NOT need complex routing.
3. Low operational complexity required
No need for:
- Central routing
- Advanced segmentation
- Large-scale connectivity management
4. Cost-sensitive small architecture
VPC Peering has:
- No hourly charge
- Only data transfer costs
So it is cheaper for small setups.
❌ Limitations of VPC Peering (very important for exam)
- No transitive routing
- No central management
- Many connections needed for many VPCs (complex mesh)
- Hard to scale beyond a few VPCs
- No built-in route aggregation or segmentation
2. What is AWS Transit Gateway?
A Transit Gateway is a central hub that connects:
- Multiple VPCs
- On-premises networks (via VPN or Direct Connect)
- Multiple AWS accounts
Instead of connecting VPCs one by one, everything connects to a central router.
🧠 Key idea:
Instead of many direct connections, all networks connect to a single hub.
✅ When Transit Gateway is appropriate
1. Large number of VPCs
If you have:
- Many VPCs (10, 50, 100+)
👉 Transit Gateway is the correct choice because:
- It avoids complex peering mesh
- Reduces operational overhead
2. Need for transitive routing
If VPC-A must talk to VPC-B and VPC-B must talk to VPC-C through shared routing rules.
👉 Transit Gateway supports:
- A → B → C communication (transit routing allowed)
3. Centralized network management
Use when you need:
- Central route control
- Central security segmentation
- Easier network scaling
4. Hybrid cloud connectivity
If you need:
- On-premises network + multiple VPCs
- VPN or Direct Connect integration
👉 Transit Gateway becomes the main routing hub
5. Multi-account AWS environments
Common in enterprise setups:
- Each team has its own AWS account
- All accounts connect to a shared Transit Gateway
❌ Limitations of Transit Gateway
- Higher cost than VPC Peering
- More configuration required
- Slightly more latency than direct peering (due to hub routing)
- Requires planning for route tables and segmentation
⚖️ VPC Peering vs Transit Gateway (Exam Comparison)
| Feature | VPC Peering | Transit Gateway |
|---|---|---|
| Architecture | Point-to-point | Hub-and-spoke |
| Scalability | Low | Very high |
| Transitive routing | ❌ Not supported | ✅ Supported |
| Complexity | Simple | Medium to high |
| Cost | Lower (small scale) | Higher (but efficient at scale) |
| Central control | ❌ No | ✅ Yes |
| Best for | Few VPCs | Many VPCs + enterprise networks |
🧩 Exam Decision Guide (Very Important)
Use VPC Peering when:
- Only 2–3 VPCs need direct communication
- No future growth expected
- No need for centralized routing
Use Transit Gateway when:
- More than a few VPCs exist
- You expect growth or scaling
- You need centralized network control
- You require hybrid connectivity (VPN/Direct Connect)
- You need transitive routing
🚨 Common Exam Traps
❌ Choosing VPC Peering when:
- There are many VPCs → WRONG
- You need transitive routing → WRONG
- You need centralized control → WRONG
❌ Choosing Transit Gateway when:
- Only 2 VPCs exist and simplicity is key → unnecessary complexity
🧠 Final Summary (Exam Ready)
- VPC Peering is best for simple, direct, small-scale VPC connections.
- Transit Gateway is best for scalable, enterprise-level, multi-VPC and hybrid networking.
- The key difference is direct connection vs centralized routing hub.
