<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>cost on </title>
    <link>/tags/cost/</link>
    <description>Recent content in cost on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 13 Sep 2026 09:36:45 +0800</lastBuildDate><atom:link href="/tags/cost/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>NAT Gateway 的三笔冤枉钱</title>
      <link>/posts/nat-gateway-data-processing-cost/</link>
      <pubDate>Sun, 13 Sep 2026 09:36:45 +0800</pubDate>
      
      <guid>/posts/nat-gateway-data-processing-cost/</guid>
      <description>NAT Gateway 有两笔费用：一笔按网关存在的小时数收，一笔按过它的字节数收。两笔都可能白花，其中每 GB 那笔的口径最容易看错，Amazon VPC 定价页的原话是：
Data processing charges apply for each gigabyte processed through the NAT gateway regardless of the traffic&amp;rsquo;s source or destination
regardless of the traffic&#39;s source or destination：目的地在同一个可用区、同一个区域，还是地球另一端，单价一样。所以只要一个包从私有子网绕出去，这笔钱就照收，跟它本来有近路可走无关。
IPv4 的出公网流量（调外部 API、拉公网镜像）没有别的走法，该走 NAT 还是走 NAT，这部分每 GB 的钱省不掉。IPv6 多一条路，给实例 IPv6 地址、路由指向 egress-only internet gateway，出向就不用过 NAT：这个网关只往外走、不让公网主动连进来，本身不收钱，过它的字节按 EC2 的公网数据传输计费。
冤枉钱来自三件事：一件出在小时费上，两件出在每 GB 那笔上，各自有不同的成因和修法。
浪费 怎么产生的 解法 实测 网关空转 NAT 建完就没人拆，小时费按个数一直计 确认没流量后删网关，连 EIP 一起释放 8 个网关，每月 400 多美元，另加 29 美元的 EIP 到 AWS 服务的流量绕公网 私有子网里 0.</description>
    </item>
    
  </channel>
</rss>
