成本优化 在 AWS 上涉及恰当调整资源规模、选择适当的定价模式、消除浪费和持续监控支出。由于云成本可能会大幅增长,优化成本是一项重要且持续的工作——也是 Well-Architected Framework 的一个支柱。
恰当调整资源规模并消除浪费
✓ RIGHT-SIZE — match instance/resource sizes to actual usage (don't over-provision;
many resources are oversized → wasted money). Use metrics to size correctly.
✓ ELIMINATE WASTE — find and remove UNUSED resources:
→ idle/stopped-but-still-billed resources, unattached EBS volumes, old snapshots,
unused Elastic IPs, forgotten test/dev environments
→ a forgotten running instance costs money 24/7
✓ Shut down non-production environments when not in use (nights/weekends)
定价模式(大幅节省)
✓ RESERVED INSTANCES / SAVINGS PLANS → commit 1-3 years → up to ~70% off for STEADY
workloads (predictable baseline capacity)
✓ SPOT INSTANCES → up to ~90% off spare capacity for FAULT-TOLERANT/flexible workloads
(batch, CI, big data) — can be interrupted
✓ ON-DEMAND → for variable/unpredictable parts; SERVERLESS (Lambda) → pay per use,
zero cost when idle
→ Mix: reserved for the baseline, on-demand/spot for the variable part.
