The Situation
When I first audited our AWS infrastructure, the monthly bill was sitting at $5,000. After 3 months of systematic optimization, we brought it down to $1,500 — a 70% reduction — while actually improving performance and reliability.
The key insight: most AWS cost overruns come from 3 sources — idle resources, inefficient instance types, and poor storage class selection.
Strategy 1: Serverless for Low-Traffic Services
We identified 12 microservices that averaged less than 100 requests per minute. Running them on EC2 was like using a sledgehammer to crack a nut. Here's the before and after:
# Before: EC2 instances
- 12 × t3.medium EC2 instances
- Running 24/7
- Cost: $360/month
# After: Lambda + API Gateway
- 12 Lambda functions
- Pay per invocation
- Cost: $12/month
# Savings: $348/month (96% reduction)The migration wasn't as simple as copy-paste. We had to refactor the services to be stateless, handle cold starts, and adjust the deployment pipeline. But the long-term savings were worth the effort.
Strategy 2: Spot Instances for Non-Critical Workloads
For batch processing jobs, CI/CD runners, and development environments, Spot Instances delivered up to 90% savings compared to On-Demand pricing.
The trick is to design for failure. If your workload can handle instance interruptions, Spot Instances are basically free compute. We use Spot Fleet with a mix of instance types to maximize availability.
— Cost optimization principle from AWS Well-Architected Framework
Strategy 3: S3 Storage Class Optimization
We had terabytes of data sitting in S3 Standard that hadn't been accessed in over 90 days. Moving to Intelligent-Tiering and Glacier for archival data saved thousands per month.
# S3 Lifecycle Policy Example
{
"Rules": [
{
"Status": "Enabled",
"Transitions": [
{"Days": 30, "StorageClass": "STANDARD_IA"},
{"Days": 90, "StorageClass": "GLACIER"}
]
}
]
}💡 Pro tip: Use S3 Intelligent-Tiering for unpredictable access patterns. It automatically moves objects between tiers with no retrieval fees.