SAA-C03 ยท Cost management, databases and network costs
VPC peering versus Transit Gateway
Non-transitive VPC peering versus hub-and-spoke Transit Gateway, connecting many VPCs and on-premises networks and the cost and scale trade-offs.
Key points
- VPC peering: 1:1, cross-account/Region; not transitive, no overlapping CIDRs, one per pair; can't use peer's internet gateway, NAT, VPN, Direct Connect.
- Both sides add routes; full mesh: n(n-1)/2 peerings.
- Transit Gateway: Regional hub for VPCs, VPNs, Direct Connect gateways, TGW peerings (static routes).
- One associated route table per attachment, propagation to many; separate tables isolate dev and prod.
- Paid per attachment and GB.
Source: https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html
Practice questions
VPC A is peered with VPC B and with VPC C. B and C are not peered. How can instances in B reach instances in C?
- Automatically, through VPC A
- By adding a route in VPC A that forwards B's traffic to C
- Only with a separate peering connection between B and C
- By enabling DNS resolution on the A-B peering
Show answer
Answer: C. Only with a separate peering connection between B and C
VPC peering is not transitive, so A cannot act as a transit point. B and C need their own peering connection (or all three can attach to a transit gateway). Route tables in A cannot forward peered traffic onward.
Which statements about VPC peering are correct?
- Peering relationships are not transitive
- The two VPCs must not have overlapping CIDR blocks
- The peer VPC can be in another account or another Region
- A VPC can reach the internet through its peer's internet gateway
- Two VPCs can have several peering connections for more bandwidth
Show answer
Answer: A. Peering relationships are not transitive, B. The two VPCs must not have overlapping CIDR blocks, C. The peer VPC can be in another account or another Region
Peering is non-transitive, the two VPCs may not have overlapping CIDR blocks, and peers can be in other accounts or Regions. A VPC cannot use its peer's internet gateway, and only one peering connection can exist between the same two VPCs at a time.
If VPC A has a Site-to-Site VPN to the corporate network and is peered with VPC B, instances in VPC B can reach the corporate network through A's VPN.
Show answer
Answer: False
False. VPC peering does not support edge-to-edge routing: B cannot use A's VPN, Direct Connect, internet gateway or NAT device. To share one on-premises link across many VPCs, attach them and the VPN to a transit gateway.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
