AWS Database Cost Optimization
How to Reduce AWS RDS Costs - Rightsizing, Reservations, and Aurora Migration
RDS is consistently the second-biggest line item on startup AWS bills. Unlike EC2, it's harder to rightsize, easier to over-commit, and almost always over-provisioned from day one.
Why RDS Is Chronically Over-Provisioned
The launch pattern
At launch, an engineer sizes the database conservatively - "we might get a spike" - and picks a db.r5.xlarge. Six months later, the product has 50K users and the database is running at 12% CPU and 30% RAM.
Nobody proposes downsizing it because database migrations are risky and scary. So it keeps running. Multi-AZ doubles the cost. The bill compounds.
The hidden cost leaks
- gp2 storage (20% more expensive than gp3 with no performance benefit at most sizes)
- Provisioned IOPS (io1/io2) for workloads that don't need them
- Multi-AZ for dev and staging environments
- No Reserved Instances (paying 42% more on On-Demand)
- Automated snapshots with no retention lifecycle
RDS Rightsizing: Instance + Storage
Instance rightsizing
Use CloudWatch metrics: CPUUtilization, FreeableMemory, DatabaseConnections, and ReadIOPS / WriteIOPS.
If CPU is consistently below 30% and FreeableMemory is above 2GB, the instance is over-provisioned. Downsize by one instance class - not two - and monitor for 1 week before proceeding.
Safe pattern: Enable Performance Insights (free for 7-day retention) to understand query-level load before resizing. This tells you if the bottleneck is CPU, I/O, or connection count.
Storage optimization: gp2 → gp3
gp2 (old default)
- • $0.115/GB/month
- • IOPS burst via credit system (unreliable at scale)
- • IOPS and throughput cannot be set independently
- • 3 IOPS/GB baseline (300 IOPS minimum for 100GB)
gp3 (recommended)
- • $0.092/GB/month (20% cheaper)
- • 3,000 IOPS and 125 MB/s baseline included free
- • IOPS and throughput configurable independently
- • No burst - consistent, predictable performance
Migration is zero-downtime. AWS performs the storage conversion in the background with no reboot required. This is a single Terraform attribute change and saves 20% immediately.
Aurora Serverless v2: For Variable Workloads
If your database load is spiky - high during business hours, near-zero at night - Aurora Serverless v2 scales compute capacity dynamically, charging only for what you use.
Good fit for Aurora Serverless v2
- Development and staging environments
- SaaS apps with per-tenant databases (variable per-tenant load)
- Workloads with clear business-hours patterns
- APIs with unpredictable traffic (new products, viral potential)
Not ideal for
- ✕Steady-state high-load production databases (provisioned + RI is cheaper)
- ✕Workloads requiring <1ms scaling response time
- ✕Systems with very predictable, flat load profiles
Reserved Instances for RDS
Once you've rightsized, commit. RDS Reserved Instances save 38–52% vs On-Demand depending on the term and upfront payment option.
| Option | Discount vs On-Demand | Break-even | Recommendation |
|---|---|---|---|
| 1-year, No Upfront | 38% | ~8 months | Best for most startups - no cash tied up |
| 1-year, All Upfront | 42% | ~7 months | If you have the cash and AWS spend is predictable |
| 3-year, No Upfront | 43% | ~8 months | Avoid - 3-year commitment is too long at Series A–C |
| 3-year, All Upfront | 52% | ~6 months | Avoid - too risky to commit at this stage |
Important: rightsize before committing. Buying a 1-year RI for an oversized db.r5.2xlarge locks in waste. Do the rightsizing first, then commit to the correctly-sized instance.