<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>aws on </title>
    <link>/tags/aws/</link>
    <description>Recent content in aws on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 14 Sep 2026 06:17:25 +0800</lastBuildDate><atom:link href="/tags/aws/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>AWS 的 gateway endpoint 和 interface endpoint 怎么选</title>
      <link>/posts/vpc-gateway-vs-interface-endpoint/</link>
      <pubDate>Mon, 14 Sep 2026 06:17:25 +0800</pubDate>
      
      <guid>/posts/vpc-gateway-vs-interface-endpoint/</guid>
      <description>默认那条路：出 VPC 走 IGW 或 NAT 私有子网里的实例访问 AWS 服务，默认只有一条路：0.0.0.0/0 指向 NAT Gateway，出 VPC。AWS 的文档里，服务的默认 endpoint 是公网接口：
The default service endpoints are public interfaces, so you must add an internet gateway to your VPC so that traffic can get from the VPC to the AWS service.
域名形态是 https://&amp;lt;service_code&amp;gt;.&amp;lt;region_code&amp;gt;.amazonaws.com，解析出来是公网 IP，于是公有子网这条路直接指向 IGW，私有子网中间要多一跳 NAT。这里有个词容易读错：包确实离开了你的 VPC，但并没有离开 AWS 的网络，IGW 这个名字里带 internet，它不等于出了 AWS 内网。按 GB 收的那笔钱出在 NAT 上，公有子网直连 IGW 没有这笔。
这笔的单价和计费口径在 NAT Gateway 那篇里按东京区算过：目的地在同一个可用区还是地球另一端单价一样，所以私有子网里拉一个 S3 大对象也要按 GB 付钱。安全这一侧，服务看到的仍是实例的公网出口地址，你能控制的只有出站规则。</description>
    </item>
    
    <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>
