Concept · Builds on CLF-C02
NAT gateway cost design
A NAT gateway bills per hour and per GB, so place it by AZ and send heavy traffic around it.
You know from Cloud Practitioner
- A NAT gateway lets private subnets reach the internet.
- It sits in a public subnet.
- AWS manages it for you.
One shared
- Cost
- Lowest hourly, cross-AZ fees
- Resilience
- An AZ loss cuts egress
One per AZ
- Cost
- Hourly in each AZ
- Resilience
- Survives an AZ loss
NAT instance
- Cost
- Cheap if traffic is tiny
- Resilience
- You build failover
| Option | Cost | Resilience |
|---|---|---|
| One shared | Lowest hourly, cross-AZ fees | An AZ loss cuts egress |
| One per AZ | Hourly in each AZ | Survives an AZ loss |
| NAT instance | Cheap if traffic is tiny | You build failover |
What it is
A NAT gateway bills for every hour it exists and for every GB it processes, on top of normal data transfer. The per-GB fee is often the larger part: a private subnet that pulls terabytes from S3 through NAT pays twice. A gateway VPC endpoint for S3 or DynamoDB is free and takes that traffic off the NAT gateway. Interface endpoints bill per hour and per GB, so check the volume.
What it is
A standard NAT gateway lives in one AZ. One shared NAT gateway is the cheapest, but it is a single point of failure, and instances in other AZs pay cross-AZ fees to reach it. One NAT gateway per AZ costs more in hourly fees, survives an AZ failure and avoids the cross-AZ hop. Use one per AZ for production and one for dev. AWS also offers a regional NAT gateway that spans AZs and bills for each AZ it uses.
What it is
A NAT instance is an EC2 instance you manage: patching, sizing, turning off the source and destination check, and failover scripts. For tiny traffic it can cost less, but its bandwidth depends on instance size and it has no built-in high availability. A public NAT gateway has an Elastic IP and reaches the internet. A private NAT gateway has no internet access. It translates addresses for traffic to other VPCs or on-premises networks, for example when address ranges overlap.
Remember
- NAT gateway cost = hourly fee + per GB processed.
- Gateway endpoints for S3 and DynamoDB are free and bypass NAT.
- One NAT gateway per AZ: resilient, no cross-AZ fee, higher hourly cost.
- One shared NAT gateway: cheapest, a single point of failure, cross-AZ fees.
Remember
- NAT instance: you manage it. Cheaper for tiny traffic, no built-in high availability.
- Private NAT gateway: no internet, for VPC-to-VPC or on-premises translation.
On the exam
- “Private instances download a lot from S3, and the NAT cost is high” points to a gateway VPC endpoint for S3.
- “NAT must survive the loss of an AZ” points to one NAT gateway in each AZ.
- “Dev environment, minimize NAT cost” points to a single NAT gateway.
- “Private NAT gateway” points to overlapping or private address ranges, not internet access.
Do not mix it up with
- VPC endpointsPrivate access to AWS services with no NAT gateway: gateway endpoints and interface endpoints.
- Data transfer cost designKnow which paths cost money, then route traffic to avoid them.
- Subnets, route tables, gateways and NATDesign public, private and isolated tiers across Availability Zones, and pick the right gateway for each path.
In this task · 4.4
- Data transfer cost design
- NAT gateway cost design
- Cost of network connectivity
- CDN and edge caching for cost
- Throttling strategies
Organizations
- Subnets, route tables, gateways and NAT
- VPC endpoints
Load Balancing
Route 53
- Service Quotas
- VPC peering
Transit Gateway
PrivateLink
NLB and GWLB
CloudFront
Global Accelerator
- Hybrid connectivity decision
Direct Connect
Site-to-Site VPN
- Cost allocation tags
Cost Explorer
Budgets
Cost and Usage Reports
- Multi-account billing