1.The Full Connectivity Surface
At a senior level the question stops being "how does a VPC work" and becomes "which of the eight ways to connect two networks is right here". Peering, Transit Gateway, VPN, Direct Connect, PrivateLink, VPC endpoints, NAT, and public internet each solve a different shape of problem, and each has a different cost and failure mode.
Key features
- Transit Gateway is a network transit hub interconnecting VPCs and on-premises networks; inter-Region peering connects transit gateways over the AWS global backbone
- A transit gateway attachment is associated with exactly one route table, while a route table can have zero to many attachments — associations decide which routes an attachment sees
- Route propagation differs by attachment type: VPN and Direct Connect gateway propagate dynamically via BGP, a VPC needs static routes, and a peering attachment always needs a static route
- VPC peering is non-transitive — A↔B and B↔C does not give A↔C — which is the specific limitation Transit Gateway exists to remove
- Gateway VPC endpoints (S3, DynamoDB) are route table entries and free; interface endpoints (PrivateLink) are ENIs in your subnets and billed hourly plus per GB
- Centralized egress puts one NAT gateway in a shared VPC behind Transit Gateway so twenty VPCs do not each pay for their own — but Transit Gateway itself is billed per attachment-hour plus per GB, a running cost a peering mesh does not have
Choosing a connectivity mechanism
- AWS to AWS
- VPC peering — two VPCs, non-transitive, no hourly charge
- Transit Gateway — many VPCs + on-premises, transitive
- PrivateLink / endpoints — reach a service, not a network
- AWS to elsewhere
- Direct Connect — dedicated link, consistent latency
- Site-to-Site VPN — over the internet, encrypted, BGP
- NAT gateway — outbound only, to the internet
Signature
peering (2, non-transitive) · TGW (many + on-prem, transitive) · gateway EP (S3/DDB, free) · PrivateLink · DX / VPN · NAT
Peering for two VPCs (non-transitive, no hourly cost); Transit Gateway for many plus on-premises (per attachment-hour, per GB); gateway endpoints for S3/DynamoDB (free, always add them); PrivateLink for private service access; Direct Connect or VPN for on-premises; centralize NAT rather than one per VPC.