Gateway endpoint
Route-table entry. Free. Available only for S3 and DynamoDB. Best for keeping S3 traffic off the internet without paying for NAT egress.
Almost every SAA-C03 scenario touches VPCs. Have the packet path memorized.
flowchart LR igw[Internet Gateway] --- pubrt[Public Route Table] pubrt --- pub[Public subnet: 10.0.1.0/24] pub --- nat[NAT Gateway] nat --- privrt[Private Route Table] privrt --- priv[Private subnet: 10.0.11.0/24] priv --- ec2[EC2 workloads] ec2 -.->|VPC endpoint| s3[(S3)]
| Concern | NAT Gateway | NAT instance |
|---|---|---|
| Managed by AWS | ✅ | ❌ (you patch it) |
| Throughput | 45 Gbps burst | Limited by instance type |
| Cost | Per-hour + per-GB | EC2 hourly (cheaper for low tx) |
| HA | Redundant within an AZ | Manual (script your failover) |
Gateway endpoint
Route-table entry. Free. Available only for S3 and DynamoDB. Best for keeping S3 traffic off the internet without paying for NAT egress.
Interface endpoint
Powered by AWS PrivateLink — an ENI in your subnet with a private IP. Works with most services (SSM, KMS, SNS, ECR, custom services). Hourly + per-GB.
TGW replaces the “peer every VPC to every other VPC” nightmare with a hub-and-spoke topology.
flowchart TB TGW((Transit Gateway)) VPCa[VPC A: shared services] VPCb[VPC B: prod] VPCc[VPC C: non-prod] DX[Direct Connect gateway] onprem[On-prem DC] VPCa --- TGW VPCb --- TGW VPCc --- TGW TGW --- DX DX --- onprem
flowchart LR
P{Destination}
P -->|Local VPC CIDR| local[local]
P -->|Internet, from public subnet| igw[igw-…]
P -->|Internet, from private subnet| nat[nat-…]
P -->|S3 or DDB| gwep[Gateway endpoint prefix list]
P -->|Other VPCs / on-prem| tgw[tgw-attach-…]