<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>控制 AWS 成本 &#8211; 外贸服务器代维护工作室</title>
	<atom:link href="https://www.fuwuqi120.com/tag/%e6%8e%a7%e5%88%b6-aws-%e6%88%90%e6%9c%ac/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fuwuqi120.com</link>
	<description>｜外贸网站服务器代维：阿里云 ECS、AWS EC2、Linux、宝塔面板、WordPress 独立站托管与排障。</description>
	<lastBuildDate>Sun, 15 Nov 2026 16:33:34 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>外贸站控制 AWS 成本怎么配</title>
		<link>https://www.fuwuqi120.com/%e5%a4%96%e8%b4%b8%e7%ab%99%e6%8e%a7%e5%88%b6-aws-%e6%88%90%e6%9c%ac%e6%80%8e%e4%b9%88%e9%85%8d/</link>
					<comments>https://www.fuwuqi120.com/%e5%a4%96%e8%b4%b8%e7%ab%99%e6%8e%a7%e5%88%b6-aws-%e6%88%90%e6%9c%ac%e6%80%8e%e4%b9%88%e9%85%8d/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sun, 15 Nov 2026 16:33:34 +0000</pubDate>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[AWS EC2 价格]]></category>
		<category><![CDATA[AWS 流量费用]]></category>
		<category><![CDATA[WordPress 托管成本]]></category>
		<category><![CDATA[外贸独立站服务器]]></category>
		<category><![CDATA[控制 AWS 成本]]></category>
		<guid isPermaLink="false">https://www.fuwuqi120.com/%e5%a4%96%e8%b4%b8%e7%ab%99%e6%8e%a7%e5%88%b6-aws-%e6%88%90%e6%9c%ac%e6%80%8e%e4%b9%88%e9%85%8d/</guid>

					<description><![CDATA[先砍错配的 EC2、EBS 和出网流量，再谈预留实例。外贸独立站按月 30-120 美元能跑稳，别一上来买高配套件。]]></description>
										<content:encoded><![CDATA[<div class="fuwuqi120-answer">
<p><strong>一句话答案：</strong>先砍错配的 EC2、EBS 和出网流量，再谈预留实例。外贸独立站按月 30-120 美元能跑稳，别一上来买高配套件。</p>
</div>
<div class="fuwuqi120-toc">
<p><strong>本文目录</strong></p>
<ol>
<li><a href="#fuwuqi120-h2-1">钱花在哪：外贸站账单先看这四项</a></li>
<li><a href="#fuwuqi120-h2-2">三档配置：按询盘量买，不按感觉买</a></li>
<li><a href="#fuwuqi120-h2-3">30 秒判断：这台 EC2 是不是买大了</a></li>
<li><a href="#fuwuqi120-h2-4">怎么买最划算：顺序别反了</a></li>
<li><a href="#fuwuqi120-h2-5">线路差异：省错地方会丢欧美询盘</a></li>
<li><a href="#fuwuqi120-h2-6">坑：账单降了，站也慢了或被黑了</a></li>
</ol>
</div>
<h2 id="fuwuqi120-h2-1">钱花在哪：外贸站账单先看这四项</h2>
<p>账单先查 EC2、EBS、快照和出网流量，四项能解释外贸站八成以上花费。</p>
<p>我接手过的 WordPress 独立站，EC2 常占 35%-60%。EBS、快照、公网出网紧随其后。CloudFront 压图片流量是有效的，但缓存规则配错，回源多跑一遍，反而多一份请求费和回源流量。广告一投放，这个问题当天就能看出来。</p>
<p>EC2 按秒还是按小时，看 OS 和计费选项，别听人一句「AWS 都是按秒」就去做预算。Linux 按需我常用 t3.small 约 0.0208 美元/小时、t3.medium 约 0.0416 美元/小时，区域不同会变。us-east-1 和 ap-southeast-1 我见过差价接近 20%。欧美客户为主的站放 us-east-1，通常比放新加坡便宜，延迟还更稳。</p>
<table>
<thead>
<tr>
<th>项目</th>
<th>常见规格 / 单价</th>
<th>月成本粗算</th>
<th>外贸站适用场景</th>
</tr>
</thead>
<tbody>
<tr>
<td>EC2 Linux 按需</td>
<td>t3.small 0.0208 美元/小时</td>
<td>约 15.2 美元 / 730 小时</td>
<td>日 PV 1 万以内、WooCommerce 轻量站</td>
</tr>
<tr>
<td>EC2 Linux 按需</td>
<td>t3.medium 0.0416 美元/小时</td>
<td>约 30.4 美元 / 730 小时</td>
<td>后台批量导产品、常跑 WP-Cron</td>
</tr>
<tr>
<td>EBS gp3</td>
<td>20 GiB，默认 3000 IOPS / 125 MiB/s</td>
<td>约 1.6 美元起</td>
<td>产品图不多、图片已走对象存储</td>
</tr>
<tr>
<td>EBS 旧 gp2</td>
<td>100 GiB 单盘</td>
<td>约 10 美元</td>
<td>老站没清理，多数该降配</td>
</tr>
<tr>
<td>公网出网</td>
<td>0.09 美元/GB 粗算</td>
<td>1 万 PV × 3 MB ≈ 30 GB ≈ 2.7 美元</td>
<td>未压缩产品页、图片没命中缓存</td>
</tr>
</tbody>
</table>
<p>gp3 那 3000 IOPS、125 MiB/s，对大多数外贸展示站已经够。很多老板还挂着迁移前留下的 gp2 100 GiB，单盘 10 美元/月，后台一看实际用了不到 20 GiB。这个坑我踩过，迁站时只顾着搬文件，没顺手改盘型，白付了半年。</p>
<p>出网最容易漏算。欧美客户打开 1 个未压缩 3 MB 产品页，1 万 PV 就是约 30 GB。按 0.09 美元/GB 粗算 2.7 美元，数字不大，但图片没走缓存时，账单会跟着广告投放一起跳。先做 30 秒判断，在 EC2 上用 root 或 sudo 身份执行：</p>
<pre><code># 在哪台：AWS EC2 实例；身份：root 或具备 sudo 的 ec2-user / ubuntu
# 看近 5 分钟出网网卡流量，单位 KB/s
sar -n DEV 5 6 | grep -E 'eth0|ens5' | tail -6

# 看 Nginx 当天 200 响应里最大的 10 个页面体积
sudo awk '$9==200 {print $10, $7}' /var/log/nginx/access.log 
  | sort -nr | head -10

# 看 CloudFront 是否真命中，X-Cache 出现 Miss 就要查回源
curl -sI https://你的域名/wp-content/uploads/2024/06/main.jpg 
  | grep -iE 'x-cache|cache-control|content-length'</code></pre>
<p>支付页别为省钱放回国内部署。Stripe、PayPal 回调对延迟和 TLS 会话敏感，国内出口绕一圈，偶发超时比多花几美元麻烦。我一般把站放 us-east-1 或 eu-west-1，东南亚询盘多再单独加 Singapore 的 CloudFront 缓存层，只缓存图片和静态资源，checkout、wp-admin、回调路径全部绕过。缓存 TTL 给 7 天，别给 1 小时，1 小时那种配法我见过一个月多出十几美元回源费。</p>
<ul>
<li><strong>先拉 Cost Explorer 按 Service 分组</strong>，看上月 EC2、EBS、Snapshot、Data Transfer 四项各占多少，别先看总价。</li>
<li>查闲置盘和老快照，在 AWS CLI 所在本机用有 <code>ec2:Describe*</code> 权限的身份执行：
<pre><code># 在哪台：本地运维机或跳板机；身份：带只读 EC2 权限的 IAM 用户
aws ec2 describe-volumes --region us-east-1 
  --query 'Volumes[?State==`available`].[VolumeId,Size,VolumeType,CreateTime]' 
  --output table

aws ec2 describe-snapshots --owner-ids self --region us-east-1 
  --query 'Snapshots[?StartTime&lt;=`2024-01-01`].[SnapshotId,VolumeSize,StartTime]' 
  --output table</code></pre>
</li>
<li>gp2 转 gp3 不用停机，但先打快照。命令在上一步那台机器、同 IAM 身份执行：
<pre><code>aws ec2 modify-volume --region us-east-1 
  --volume-id vol-xxxxxxxxxxxx 
  --volume-type gp3 --iops 3000 --throughput 125</code></pre>
</li>
<li>区域差价不确定就别猜，直接按两个区域各查一次按需价再定，us-east-1 与 ap-southeast-1 的报价我见过接近 20% 的差，具体月份会浮动。</li>
</ul>
<h2 id="fuwuqi120-h2-2">三档配置：按询盘量买，不按感觉买</h2>
<p>按日 UV 和产品数分三档买，别按「以后会做大」提前堆配置。</p>
<p>我接手的外贸站里，超支多半不是流量真涨了，是老板按感觉选了 4 vCPU / 8 GiB，结果后台常年 CPU 3%。AWS 按需机器改规格只要停几分钟，提前买三年承诺反而锁死。下面三档是我按近两年独立站工单倒出来的，价格按 us-east-1 / ap-southeast-1 按需、含 20-40 GiB gp3 和基础出网估的，不含域名和第三方邮件服务。具体单价随区域浮动，我不给死数。</p>
<table>
<thead>
<tr>
<th>档位</th>
<th>EC2 / 内存 / 盘</th>
<th>云账单区间（美元/月）</th>
<th>外贸站实际场景</th>
</tr>
</thead>
<tbody>
<tr>
<td>A 展示型</td>
<td>1× t3.small，2 vCPU / 2 GiB，20-30 GiB gp3</td>
<td>18-30</td>
<td>日 UV ≤300、产品 ≤200，欧美客户看 catalog 走表单询盘</td>
</tr>
<tr>
<td>B 带下单</td>
<td>t3.medium 或 t4g.medium，4 GiB，40 GiB gp3</td>
<td>45-80</td>
<td>日 UV 300-2000，WooCommerce + 订单邮件通知 + MySQL 8.0</td>
</tr>
<tr>
<td>C 双线多语言</td>
<td>EC2 + ALB + CloudFront + RDS db.t4g.small</td>
<td>120-260</td>
<td>月 PV &gt;5 万，欧美 + 东南亚同时进站，黑五有峰值</td>
</tr>
</tbody>
</table>
<p>A 档我一般直接装 Ubuntu 22.04 LTS + Nginx 1.24 + PHP 8.2，静态产品页缓存开好，2 GiB 够跑。别顺手挂 CloudFront 以外的额外组件，展示站用不上。新机初始化完，在<strong>目标 EC2、root 或 sudo 用户</strong>上核一遍：</p>
<pre><code>nginx -v
php -v
free -m
df -hT /</code></pre>
<p>B 档别省那 2 GiB。wp-cron 扫库存、MySQL 8.0 跑订单表、再叠一封 SMTP 通知，2 GiB 机器我处理过至少七八次 OOM，表现是海外客户半夜下单白屏，白天看又正常。在<strong>该 EC2、sudo 身份</strong>下先确认有没有已经撞过：</p>
<pre><code>sudo dmesg -T | grep -i "out of memory" | tail -20
sudo journalctl -u mysql --since "24 hours ago" | tail -30
free -m</code></pre>
<p>C 档不要硬塞进一台 8 GiB 单机。东南亚到 us-east-1 的链路和欧美不是一回事，CloudFront 扛静态、ALB 分后端、RDS 把库摘出来，比加内存管用。黑五宕一次丢的询盘和支付回调，比一年省下的机器钱贵。这个档位我见过最亏的做法，是拿一台大机器同时扛 WP、MySQL 和多语言缓存，然后怪 AWS 网络差。</p>
<p>代维费另算，别混进云账单对账。单站 Linux 代维常见 <strong>800-2500 元/年</strong>，含补丁、备份校验、被黑排查；带迁移和 7&#215;12 响应一般 <strong>3000-8000 元/年</strong>，插件超过 30 个、有自定义支付回调的会往上走，我只给区间。</p>
<p>拿不准就先开 1 个月按需，跑真实流量再定。有个老板第 1 周直接签了 3 年 Savings Plan，第 2 个月因为支付网关回源延迟把站迁回阿里云 ECS，剩余承诺退不掉，那笔钱比整机三年还扎眼。按需满 30 天，在<strong>本地电脑、有 billing 权限的 IAM 用户</strong>拉一次真实用量再谈预留：</p>
<pre><code>aws ce get-cost-and-usage 
  --time-period Start=2025-06-01,End=2025-07-01 
  --granularity MONTHLY --metrics BlendedCost 
  --group-by Type=DIMENSION,Key=SERVICE 
  --region us-east-1</code></pre>
<p>日期按你实际那 30 天改。看完 EC2、EBS、出网各占多少，再决定要不要锁 1 年，顺序别反。</p>
<h2 id="fuwuqi120-h2-3">30 秒判断：这台 EC2 是不是买大了</h2>
<p>连续 7 天峰值 CPU 低于 25%、可用内存大于 1 GiB，就降一档。</p>
<p>控制台那个「推荐规格」我基本不看。它按短时波峰给建议，外贸独立站根本不是这个负载模型。欧美客户白天发询盘，东南亚晚上刷产品页，中间大段空档。我手上有个 us-east-1 的 WordPress 站，t3.large 跑了 11 个月，2 vCPU / 8 GiB，月均 61 美元，实际峰值 CPU 才 18%。降到 t3.medium 之后 30 美元出头，Google 那边 LCP 没变化。别拿「万一黑五扛不住」当理由，扛不住是 PHP-FPM 和对象缓存的事，不是多买 4 GiB 内存能解决的。</p>
<p>30 秒判断就跑下面这一段。在<strong>目标 EC2</strong> 上，用 <strong>ec2-user 或 ubuntu</strong> 普通身份执行，别用 root。前提已经装好 awscli v2，IMDSv2 没被完全掐掉；如果实例强制 IMDSv2，curl 要换 token，这点不确定你那边策略，先跑一次看输出。</p>
<pre><code>cat &lt;&lt;'EOF' &gt; /tmp/aws-cost-check.sh
#!/bin/bash
uptime
free -m
df -hT /
sudo journalctl -u nginx --since "7 days ago" | grep -c " 500 " || true
aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name CPUUtilization --dimensions Name=InstanceId,Value=$(curl -s 169.254.169.254/latest/meta-data/instance-id) --start-time $(date -u -d '7 days ago' +%FT%TZ) --end-time $(date -u +%FT%TZ) --period 3600 --statistics Maximum --region $(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | grep -o '"region" : "[^"]*' | cut -d'"' -f4) --query 'Datapoints[*].Maximum' --output text
EOF
bash /tmp/aws-cost-check.sh</code></pre>
<p>看 CloudWatch 那行返回的 168 个数字，取最大值。<code>free -m</code> 看 available 列，别看 free 列，Linux 拿空闲内存做 page cache 是正常的。顺带看一眼 500 计数，7 天超过 20 条先别降配，那是被爬虫撞或者支付回调超时，跟规格无关，降了只会更难查。</p>
<table>
<thead>
<tr>
<th>7 天峰值 CPU</th>
<th>available 内存</th>
<th>us-east-1 常见月费区间</th>
<th>外贸站处理动作</th>
</tr>
</thead>
<tbody>
<tr>
<td>&lt; 25%</td>
<td>&gt; 1 GiB</td>
<td>t3.small 15-18 美元 / t3.medium 30-34 美元</td>
<td>直接降一档，挑欧美凌晨 02:00-04:00 UTC 变更</td>
</tr>
<tr>
<td>25% &#8211; 60%</td>
<td>512 MiB &#8211; 1 GiB</td>
<td>维持 30-61 美元</td>
<td>先加 2 GiB swap 和 Redis 对象缓存，观察 7 天</td>
</tr>
<tr>
<td>&gt; 60% 或 500 计数 &gt; 20</td>
<td>&lt; 512 MiB</td>
<td>不动或临时升 61-120 美元</td>
<td>查 WooCommerce 结算页慢查询、wp-cron、恶意 UA</td>
</tr>
</tbody>
</table>
<p>报 <code>Unable to locate credentials</code> 别急着建 IAM 用户、更别把 AK/SK 塞进 Web 服务器。给实例挂一个只读 CloudWatch 的 Instance Profile 就行，<strong>CloudWatchReadOnlyAccess</strong> 够用。我一般顺手把 Cost Explorer 权限单独留在账单账号，不放到跑 Nginx 的机器上。外贸站被挂马的次数不少，权限少一分，事后清理就少一摊事。</p>
<p>降配之外顺手清僵尸盘。迁移独立站时最常留下这东西：旧站点换 EC2，原 40 GiB gp3 数据盘没删，<code>available</code> 状态躺了半年，按 0.08 美元/GiB/月算，一块就是 3.2 美元，几块叠起来比一台 t3.small 还贵。在<strong>运维本机</strong>、用<strong>只读 IAM 身份</strong>执行：</p>
<pre><code>aws ec2 describe-volumes --region us-east-1 --filters Name=status,Values=available --query 'Volumes[*].[VolumeId,Size,CreateTime,VolumeType]' --output table</code></pre>
<ul>
<li>CreateTime 超过 30 天且确认是旧站残留，先打一份快照，快照成本约 0.05 美元/GiB/月，比留整块盘便宜。</li>
<li>多区域部署的要把 <code>--region</code> 换成 eu-west-1、ap-southeast-1 各跑一遍。东南亚节点我见过最多遗留盘，当时为了测当地访问速度临时开的。</li>
<li>别删 <code>in-use</code> 的，也别碰名字带 <code>pay</code>、<code>stripe</code>、<code>backup</code> 的卷，支付回调日志和数据库备份经常挂在上面。</li>
</ul>
<p>降配操作本身留 15 分钟窗口：先停实例、改 Instance Type、再起，弹性 IP 不会丢。要是用了宝塔面板，起来后 <code>systemctl restart bt</code> 一次，面板里绑的 PHP 版本偶尔会跟着重置。这个坑我踩过两回。</p>
<h2 id="fuwuqi120-h2-4">怎么买最划算：顺序别反了</h2>
<p>先清闲置资源，再接 CDN，最后才锁 1 年 Savings Plan。</p>
<p>顺序反了，钱就锁死了。我接过一个做欧美户外用品的独立站，老板看控制台提示&#8221;可省 40%&#8221;，直接买了 3 年全量预留，结果两个月后站点从 us-east-1 迁到 eu-west-1 走欧洲线路，那批预留一分没退。还有更常见的：测试环境 t3.medium 忘关 30 天，按 us-east-1 按需大概 30 美元；一个没绑实例的 EIP 每月 3.6 美元；旧 ALB 空挂着，一个月 16-18 美元起。这些不产生一单询盘，却天天在扣。我每月 1 号固定跑一遍清单，比看账单明细快。</p>
<p>在运维本机、用账单只读身份（挂 <code>ReadOnlyAccess</code> + <code>ce:GetCostAndUsage</code>）执行：</p>
<pre><code>aws ec2 describe-addresses --region us-east-1 --query 'Addresses[?AssociationId==`null`].[PublicIp,AllocationId]' --output table
aws elbv2 describe-load-balancers --region us-east-1 --query 'LoadBalancers[*].[LoadBalancerName,State.Code,CreatedTime]' --output table
aws ec2 describe-snapshots --owner-ids self --region us-east-1 --query 'Snapshots[?StartTime&lt;=`2025-01-01`].[SnapshotId,VolumeSize,StartTime]' --output table</code></pre>
<p>查完先别删，我一般给资源打 <code>Env=stale-2025</code> 标签放 7 天，确认没有客户从旧域名跳过来再释放。欧美客户走 CDN 边缘、东南亚回源延迟敏感，删 ELB 前顺手看一眼 CloudWatch 的 <code>RequestCount</code> 近 14 天是不是真为 0。</p>
<p>第二步把图片、CSS、JS 甩给 CloudFront，回源响应设 <code>Cache-Control: public, max-age=31536000, immutable</code>。WordPress 上传目录带版本号的那种文件名最合适，静态命中率我这边实测能到 85% 以上。EC2 出网从每月几百 GiB 掉到几十 GiB，比换机型、比谈预留折扣都直接。黑五和展会临时加的流量走按需，别提前买断。</p>
<table>
<thead>
<tr>
<th>动作顺序</th>
<th>月成本影响（us-east-1，30 GiB 盘 / 中小询盘站）</th>
<th>适用前提</th>
</tr>
</thead>
<tbody>
<tr>
<td>清未绑定 EIP、空跑 ELB、忘关测试机</td>
<td>直接减 20-50 美元，当天生效</td>
<td>任何阶段，先做</td>
</tr>
<tr>
<td>静态资源切 CloudFront + immutable 缓存</td>
<td>出网费降 60%-85%，CDN 侧约 1-8 美元</td>
<td>图片多、欧美客户占比高</td>
</tr>
<tr>
<td>1 年 Compute Savings Plan，锁 60%-70% 基线</td>
<td>折扣以当日控制台为准，不写死</td>
<td>连续跑满 3 个月、规格不再变</td>
</tr>
</tbody>
</table>
<p>锁基线这步我卡得比较死：<strong>连续 3 个月 CPU 峰谷稳定、机型没改过、没计划换区域</strong>，三条同时满足才上。剩 30% 留按需，接黑五、接广交会后的询盘脉冲。折扣幅度每天会动，控制台给多少就是多少，别拿别人截图当预算依据。</p>
<p>备份也顺手收一下。别配「每天全量快照永久保留」，我给 WordPress 站定的是 7 天每日 + 4 周每周，数据库用 <code>mysqldump</code> 单独丢 S3 Standard-IA。30 GiB 的 gp3 盘这么跑，一个月快照费常压在 3-5 美元。在 EC2 上、用 <code>root</code> 或具备 mysqldump 权限的账号执行：</p>
<pre><code>mysqldump -u wpuser -p --single-transaction --routines wpdb | gzip &gt; /tmp/wpdb_$(date +%F).sql.gz
aws s3 cp /tmp/wpdb_$(date +%F).sql.gz s3://your-backup-bucket/db/ --storage-class STANDARD_IA --region us-east-1</code></pre>
<p>支付页和备案相关的那台机别动快照策略，回滚窗口留够 7 天。旧快照按上面第三条命令筛出来，超过 4 周的周备之外我才会清。</p>
<h2 id="fuwuqi120-h2-5">线路差异：省错地方会丢欧美询盘</h2>
<p>区域别只挑便宜，选错线路丢的是欧美询盘。</p>
<p>我接过的迁移单里，最常踩的就是按小时价选区域。us-east-1 对北美、西欧的 TCP 握手通常更稳，德国、荷兰客户打开 WordPress 产品页基本在 280 ms 上下。换成最低价那档区域后，我实测过同一套站点 TTFB 涨到 900 ms，联系表单提交量当月就掉了。ap-southeast-1 反过来，马来、印尼、越南客户快一截，差 150-300 ms 很常见。外贸站询盘表单就一次机会，慢一秒客户就关了。</p>
<p>别用一台新加坡 EC2 硬扛全球。我一般把源站留在 us-east-1，前面挂 CloudFront，按客户端就近接入。东南亚的图、CSS、JS 命中边缘后，动态回源只剩支付回调和表单 POST，回源次数能压掉七成以上。比开两台 EC2 做双活便宜，也不用管数据库双向同步那个烂摊子。</p>
<table>
<thead>
<tr>
<th>方案</th>
<th>月成本区间（USD）</th>
<th>欧美 TTFB</th>
<th>东南亚 TTFB</th>
<th>适配的外贸场景</th>
</tr>
</thead>
<tbody>
<tr>
<td>单台新加坡 t3.small，无 CDN</td>
<td>18-26</td>
<td>700-900 ms</td>
<td>120-200 ms</td>
<td>只做马来/印尼，不收欧美询盘</td>
</tr>
<tr>
<td>us-east-1 t3.small + CloudFront</td>
<td>28-45</td>
<td>250-350 ms</td>
<td>静态 80-150 ms</td>
<td>欧美为主、东南亚有量，Stripe 收款</td>
</tr>
<tr>
<td>双 EC2（弗吉尼亚 + 新加坡）</td>
<td>55-90</td>
<td>250-350 ms</td>
<td>120-200 ms</td>
<td>确有本地数据库写入需求，多数独立站用不上</td>
</tr>
</tbody>
</table>
<p>备案和 AWS 海外区域没关系，别被绕进去。国内主体、只面向海外客户、域名不解析回国内 IP，通常不走 ICP 备案。一旦加国内 CDN 节点，或者拿国内 ECS 做回源，就得按备案口径重新看，具体以接入商审核为准，这个我不替谁下结论。</p>
<p>支付回调别挂廉价共享代理。Stripe webhook 超时会重试，重试堆起来就把 php-fpm 打满，t3.small 上我限 <strong>pm.max_children = 12</strong>，比盲目升 t3.large 每月省 30-45 美元。PHP 8.2 的机子，在 EC2 上用 sudo 执行，改完必须 reload，不 reload 不生效：</p>
<pre><code>sudo sed -i 's/^pm.max_children.*/pm.max_children = 12/' /etc/php/8.2/fpm/pool.d/www.conf
sudo php-fpm8.2 -t &amp;&amp; sudo systemctl reload php8.2-fpm
sudo nginx -t &amp;&amp; sudo systemctl reload nginx</code></pre>
<p>排障先花 30 秒看回源是不是被代理拖住。在 EC2 上跑 <code>curl -o /dev/null -w '%{time_starttransfer}n' https://你的域名/wp-json/</code>，超过 600 ms 且 <code>ss -tnp | grep :443 | wc -l</code> 持续过百，八成是 webhook 重试，不是机器买小了。这个坑我踩过两回，第一次真去升了 t3.large，白多花一个多月钱。</p>
<h2 id="fuwuqi120-h2-6">坑：账单降了，站也慢了或被黑了</h2>
<p>省错地方，账单少几十美元，丢一次欧美询盘就全赔回去。</p>
<p>我接过的外贸站返工单里，一半不是「买贵了」，是「砍过头了」。前台看着像宕机，客户在 WhatsApp 问怎么打不开，登录 EC2 一看 CPU 才 20%。这种最耽误事。</p>
<p>最常踩的是 gp3。有人把 IOPS 从 3000 往下压，压到基线以下，又顺手把磁盘监控关了。MySQL 8.0 碰上 <code>wp_options</code> 大表（多语言站 + 几个缓存插件，上百万行不稀奇），直接抛 <strong>Lock wait timeout exceeded</strong>。不是数据库死了，是磁盘在排队。欧美用户刷新三次全白屏，询盘表单提交不进去。我一般给独立站留 gp3 3000 IOPS / 125 MB/s 起步，不省这 3-5 美元。</p>
<p>CloudWatch 详细监控那 <strong>约 2 美元/实例/月</strong> 也别关。被 CC 打的时候，5 分钟粒度看不出脉冲，只剩客户微信一句「打不开」。没有 1 分钟数据，定位至少多花 1 小时。去年一个做汽配的站，就因为省这 2 美元，黑五前两小时才定位到单 IP 刷 <code>/wp-json/</code>。</p>
<table>
<thead>
<tr>
<th>被砍的项</th>
<th>月省（USD）</th>
<th>外贸站实际代价</th>
<th>我的处理</th>
</tr>
</thead>
<tbody>
<tr>
<td>gp3 3000 → 基线 IOPS</td>
<td>3-5</td>
<td>MySQL 8.0 锁等待，前台假宕机</td>
<td>保留 3000 IOPS，开 EBS BurstBalance 告警</td>
</tr>
<tr>
<td>CloudWatch 详细监控</td>
<td>约 2 / 实例</td>
<td>CC 攻击排查多 1 小时以上</td>
<td>主站必开，测试机可关</td>
</tr>
<tr>
<td>系统 / 插件补丁</td>
<td>0（只是省了工时）</td>
<td>挂马清理一次 800-3000 元</td>
<td>Ubuntu 22.04 LTS 每周固定查</td>
</tr>
</tbody>
</table>
<p>Budgets 设两道线，别等出账才看。80% 发邮件，100% 走 SNS 推到值班手机。下面在<strong>运维本机、账单账号身份</strong>执行，账号、邮箱、金额换成自己的：</p>
<pre><code>aws budgets create-budget --account-id 123456789012 --budget '{"BudgetName":"wp-monthly","BudgetLimit":{"Amount":"60","Unit":"USD"},"TimeUnit":"MONTHLY","BudgetType":"COST"}' --notifications-with-subscribers '[{"Notification":{"NotificationType":"ACTUAL","ComparisonOperator":"GREATER_THAN","Threshold":80,"ThresholdType":"PERCENTAGE"},"Subscribers":[{"SubscriptionType":"EMAIL","Address":"ops@example.com"}]}]' --region us-east-1</code></pre>
<p>100% 那道把 <code>Threshold</code> 改 100、<code>SubscriptionType</code> 换 <code>SNS</code> 再跑一条，ARN 用自己建的 topic。不确定 SNS 到国内手机能不能稳定收到，我这边实测过有延迟，邮件那道别省。</p>
<p>省到不打补丁最贵。WordPress 6.x 的插件漏洞被挂马，页面底部塞一段跳转，PayPal 回调还能通但询盘邮件全被改了收件人。清理代维一次常见 <strong>800-3000 元</strong>，够付一整年配置差价。Ubuntu 22.04 LTS 上我固定每周查一次，<strong>在 EC2、sudo 身份</strong>执行：</p>
<pre><code>sudo apt update &amp;&amp; sudo apt list --upgradable | grep -i -E 'openssl|nginx|php8.2'</code></pre>
<p>有输出就排窗口更，别在欧美工作日上午动 nginx。php8.2 升级前先 <code>php -v</code> 记一下小版本， WooCommerce 站对某些补丁敏感，这个我不打包票，得看装的扩展。</p>
<p>最后一条是迁移顺序。<strong>别先退 Savings Plan</strong>。我一般新环境并行跑 72 小时，DNS TTL 提前改到 60，确认 Stripe / PayPal 回调、询盘邮件、多语言跳转都通了，再处理旧承诺。有回急着退，旧实例一停发现 <code>wp-cron</code> 的时区没迁过来，订阅邮件停了两天，只能临时按按需价把机器拉回来，比省下的还多。这个坑踩过一次就够了。</p>
<h2 id="fuwuqi120-faq">常见问题</h2>
<h3>外贸 WordPress 站 AWS 一个月多少钱算正常</h3>
<p>单站日 UV 300 内 18-30 美元；带 WooCommerce 45-80 美元；不含代维费。</p>
<h3>控制 AWS 成本是不是必须买三年预留实例</h3>
<p>不是。先跑 3 个月按需，规格固定后再锁 1 年基线用量的 60%-70%。</p>
<h3>欧美客户打开慢，换便宜区域会不会更省</h3>
<p>多半更亏。源站留 us-east-1，静态走 CloudFront，比迁到低价区域稳。</p>
<h3>AWS 出网流量费突然涨了怎么 30 秒定位</h3>
<p>看 Cost Explorer 按 UsageType 分组，先查 DataTransfer-Out-Bytes 和图片命中率。</p>
<h3>旧 EC2 快照和空 EIP 要不要删</h3>
<p>留一份可恢复快照再删。available 状态超 30 天的盘、未绑定 EIP 基本是白烧钱。</p>
<div class="fuwuqi120-cta">
<p>服务器又出问题了？外贸站的宕机、被黑、迁移和访问慢，我们按次或按月代维，先免费看机器再报价。</p>
<p><a class="fuwuqi120-cta-btn" href="/service/">看看代维服务</a></p>
</div>
<div class="fuwuqi120-grid">
<p class="fuwuqi120-grid-title"><strong>0</strong></p>
<div class="fuwuqi120-grid-inner"><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/aws-builder-center-%e5%ad%a6%e7%94%9f%e5%a5%96%e5%8a%b1%e8%ae%a1%e5%88%92%e8%b7%91%e7%8b%ac%e7%ab%8b%e7%ab%99%e5%ae%9e%e6%b5%8b/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/aws-builder-center-e5ada6e7949fe5a596e58ab1e8aea1e58892e8b791e78bace7ab8be7ab99e5ae9ee6b58b-f86o0e-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">aws builder center 学生奖励计划跑独立站实测</span><span class="fuwuqi120-card-date">2026-11-16</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/%e4%bd%bf%e7%94%a8aws-%e5%aa%92%e4%bd%93%e6%9c%8d%e5%8a%a1%e6%9e%84%e5%bb%ba%e5%85%a8%e7%90%83%e7%9b%b4%e6%92%ad%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/e4bdbfe794a8aws-e5aa92e4bd93e69c8de58aa1e69e84e5bbbae585a8e79083e79bb4e692ade8a7a3e586b3e696b9e6a188-jwSmNQ-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">aliyun服务器代维</span><span class="fuwuqi120-card-title">使用AWS 媒体服务构建全球直播解决方案</span><span class="fuwuqi120-card-date">2018-11-21</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/aws-%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98%e6%b1%87%e6%80%bb/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/aws-e5b8b8e8a781e997aee9a298e6b187e680bb-9DdMPz-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">aliyun服务器代维</span><span class="fuwuqi120-card-title">AWS 常见问题汇总</span><span class="fuwuqi120-card-date">2018-08-17</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e5%af%b9%e9%9b%86%e7%be%a4%e4%bb%bb%e5%8a%a1%e6%9c%80%e5%b0%8f%e5%bd%b1%e5%93%8d%e7%9a%84-ecs-%e5%ae%b9%e5%99%a8%e5%ae%9e%e4%be%8b%e8%87%aa%e5%8a%a8%e5%8c%96/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/e5a682e4bd95e5ae9ee78eb0e5afb9e99b86e7bea4e4bbbbe58aa1e69c80e5b08fe5bdb1e5938de79a84-ecs-e5aeb9e599a8e5ae9ee4be8be887aae58aa8e58c96-phm6Fc-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">如何实现对集群任务最小影响的 ECS 容器实例自动化终止方案</span><span class="fuwuqi120-card-date">2018-08-17</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/aws-organizations-%e7%ae%a1%e7%90%86%e4%bc%97%e5%a4%9a%e4%bb%a3%e4%bb%98%e8%b4%a6%e5%8f%b7/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/aws-organizations-e7aea1e79086e4bc97e5a49ae4bba3e4bb98e8b4a6e58fb7-u0Py3h-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">AWS Organizations —— 管理众多代付账号</span><span class="fuwuqi120-card-date">2018-08-17</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/%e5%9c%a8virtual-private-cloud%e4%b8%ad%e8%87%aa%e5%bb%ba%e5%9f%ba%e4%ba%8ebind%e7%9a%84dns%e6%9c%8d%e5%8a%a1%e5%99%a8/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/e59ca8virtual-private-cloude4b8ade887aae5bbbae59fbae4ba8ebinde79a84dnse69c8de58aa1e599a8-mmGoSj-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">在Virtual Private Cloud中自建基于BIND的DNS服务器</span><span class="fuwuqi120-card-date">2018-07-27</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/%e4%b8%baaws%e5%8c%97%e4%ba%ac%e5%8c%ba%e7%ae%a1%e7%90%86%e6%8e%a7%e5%88%b6%e5%8f%b0%e9%9b%86%e6%88%90adfs%e8%ae%bf%e9%97%ae/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/e4b8baawse58c97e4baace58cbae7aea1e79086e68ea7e588b6e58fb0e99b86e68890adfse8aebfe997ae-WpIdge-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">为AWS北京区管理控制台集成ADFS访问</span><span class="fuwuqi120-card-date">2018-07-27</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/%e5%9f%ba%e4%ba%8eaws-%e5%b9%b3%e5%8f%b0%e8%b7%b3%e6%9d%bf%e6%9c%ba%e9%85%8d%e7%bd%ae/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/e59fbae4ba8eaws-e5b9b3e58fb0e8b7b3e69dbfe69cbae9858de7bdae-H1dkr4-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">基于AWS 平台跳板机配置</span><span class="fuwuqi120-card-date">2018-07-27</span></span></a><a class="fuwuqi120-card" href="https://www.fuwuqi120.com/%e4%bd%bf%e7%94%a8aws%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e8%bf%81%e7%a7%bbdms%e6%9c%8d%e5%8a%a1/"><span class="fuwuqi120-card-thumb" style="background-image:url(https://www.fuwuqi120.com/wp-content/uploads/2026/11/e4bdbfe794a8awse79a84e695b0e68daee5ba93e8bf81e7a7bbdmse69c8de58aa1-75zwht-768x430.webp)" aria-hidden="true"></span><span class="fuwuqi120-card-body"><span class="fuwuqi120-card-cat">Amazon AWS</span><span class="fuwuqi120-card-title">使用AWS的数据库迁移DMS服务</span><span class="fuwuqi120-card-date">2018-07-27</span></span></a></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fuwuqi120.com/%e5%a4%96%e8%b4%b8%e7%ab%99%e6%8e%a7%e5%88%b6-aws-%e6%88%90%e6%9c%ac%e6%80%8e%e4%b9%88%e9%85%8d/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
