ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念 · 基于 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.

本课尚未翻译,暂以英文显示。

你在云从业者中已学过

  • A NAT gateway lets private subnets reach the internet.
  • It sits in a public subnet.
  • AWS manages it for you.
阅读云从业者课程
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.

是什么

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.

是什么

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.

是什么

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.

要记住

  • 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.

要记住

  • 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.

考试中

  • “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.