DevOps5 min read

Cloud Cost Optimization

Reduce cloud spend by 30-70% - right-sizing instances, Reserved Instances, Spot Instances, storage tiering, and FinOps practices.

Cloud CostFinOpsAWSCost OptimizationReserved Instances

skill: Cloud Cost Optimization category: DevOps tags: [Cloud Cost, FinOps, AWS, Cost Optimization, Reserved Instances] readingTime: 5

Most cloud bills are 40-60% wasted - oversized instances, unused resources, and inefficient storage tiers. FinOps is the practice of shared financial accountability for cloud spend. Start with visibility (tagging, cost allocation) before optimizing - you can't optimize what you don't measure.

Workflow

  1. Tag resources for cost allocationWithout tags, AWS cost reports show $50K/month with no breakdown. Tags enable per-team, per-product, and per-environment cost allocation.
  2. Right-size EC2 instancesTeams over-provision servers "for safety" - a 2x oversized instance costs 2x with no benefit. CPU/Memory utilization above 40-70% is healthy.
  3. Buy Reserved Instances and Savings PlansOn-Demand pricing is the most expensive option. Reserved Instances (1-year commit) save 40%; 3-year saves 60%.
  4. Optimize S3 storage costsS3 Standard is expensive for rarely-accessed data. Intelligent-Tiering automatically moves objects to cheaper storage classes.
  5. Set up budget alertsCloud bills grow silently without alerting. Budget alerts catch cost anomalies before they become a surprise at month-end.

Output Format

FinOps: resource tagging, Compute Optimizer right-sizing, Savings Plans, S3 Intelligent-Tiering, and budget alerts.

Tags: Environment + Team + Product + ManagedBy
Monthly review: Cost Explorer grouped by tag
Right-size: CPU < 20% → smaller instance
Commitments: Compute Savings Plans for baseline
Storage: Intelligent-Tiering for unknown access patterns

Examples

Input

Output

Edge Cases & Gotchas

  • Data transfer costs - AWS charges for data leaving a region (egress) but not entering (ingress). Architect to minimize cross-region data transfer; use CloudFront for global distribution.
  • NAT Gateway costs - NAT Gateway costs $0.045/GB processed - often the surprise line item. Use VPC endpoints for S3 and DynamoDB traffic (free) instead of routing through NAT.
  • RDS over-provisioned storage - RDS storage auto-scales up but never shrinks. Provision 20% over current needs; the autoscale handles growth.
  • Spot interruption handling - Spot Instances are terminated without replacement if capacity is needed. Applications must handle graceful shutdown (SIGTERM + 2 min drain) and stateless design.

When to Break These Rules

  • Use Cloudflare R2 instead of AWS S3 for high-egress workloads - R2 has zero egress fees, while S3 charges $0.09/GB out.
  • Use a bare-metal provider (Hetzner, OVH) for predictable high-compute workloads - on-demand cloud pricing is 5-10x more expensive at sustained utilization.

Reference Files

  • https://aws.amazon.com/aws-cost-management/
  • https://www.finops.org/introduction/what-is-finops/

More skills in this library

Browse all technical skills - Mobile, AI/ML, Web, Backend, Design, and Product.