ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

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.
Read the Cloud Practitioner lesson
EC2
NAT gateway
Internet
Gateway endpoint
S3Per GB feeNo fee
Send S3 traffic around the NAT gateway.
  • 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
Shared NAT gateway, one per AZ, or NAT instance.

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.