Cloud Databases

Database Cost Optimization on AWS: RDS, Aurora, and ElastiCache in 2025

Four configuration mistakes account for 60% of AWS database waste. Learn to right-size to Graviton3, convert gp2 to gp3 storage, audit idle replicas, and use Reserved Instances to cut your database bill by 25-40%.

JusDB Team
September 16, 2025
10 min read
168 views

Your AWS database bill crossed $40K/month and engineering leadership wants a 30% reduction without degrading performance. This is a common inflection point — and almost every team has the same 4 mistakes in their RDS and Aurora configuration that account for 60% of the waste.

TL;DR
  • Right-sizing to Graviton3 (r8g) instances saves 20–40% vs x86 with equal or better performance
  • Reserved Instance + Savings Plans cuts RDS costs by 40–60% vs On-Demand
  • Aurora Serverless v2 eliminates over-provisioning for variable-load databases
  • Eliminating idle read replicas and oversized gp2 volumes typically saves 15–25% immediately

The Four Most Common AWS Database Waste Patterns

1. Graviton3 Migration (20–40% Savings)

AWS Graviton3 instances (r8g, m8g family) cost 15–20% less than equivalent x86 instances and deliver equal or better database performance. Most MySQL, PostgreSQL, and Aurora workloads migrate with zero application changes.

bash
# Compare r6g.xlarge vs r8g.xlarge pricing (us-east-1)
aws rds describe-orderable-db-instance-options \
  --engine mysql --engine-version 8.0.39 \
  --query "OrderableDBInstanceOptions[?contains(DBInstanceClass, 'r8g')].{Class:DBInstanceClass,Storage:StorageType}" \
  --output table

# Modify RDS instance to Graviton3
aws rds modify-db-instance \
  --db-instance-identifier prod-mysql \
  --db-instance-class db.r8g.xlarge \
  --apply-immediately

# Cost comparison: r6g.xlarge On-Demand = $0.48/hr
# r8g.xlarge On-Demand = $0.44/hr
# Annual savings on single instance: ~$350

2. Reserved Instances + Savings Plans (40–60% Savings)

bash
# Check your current RDS utilization
aws ce get-cost-and-usage \
  --time-period Start=2025-01-01,End=2025-09-01 \
  --granularity MONTHLY \
  --filter '{"Dimensions":{"Key":"SERVICE","Values":["Amazon RDS"]}}' \
  --group-by Type=DIMENSION,Key=USAGE_TYPE \
  --metrics "UnblendedCost"

# Purchase 1-year Reserved Instance for stable workloads
aws rds purchase-reserved-db-instances-offering \
  --reserved-db-instances-offering-id OFFERING_ID \
  --reserved-db-instance-id prod-mysql-ri \
  --db-instance-count 1

# Savings: On-Demand db.r8g.xlarge MySQL = $0.44/hr
# 1yr RI No-Upfront: $0.27/hr (38% savings)
# 3yr RI All-Upfront: $0.19/hr (57% savings)

3. Aurora Serverless v2 for Variable Workloads

bash
# Convert to Aurora Serverless v2 for dev/staging and variable-load prod
aws rds modify-db-cluster \
  --db-cluster-identifier analytics-cluster \
  --serverless-v2-scaling-configuration MinCapacity=0.5,MaxCapacity=16 \
  --apply-immediately

# Serverless v2 billing: $0.12 per ACU-hour
# 0.5 ACU minimum vs db.r6g.large always-on ($0.26/hr)
# If avg utilization is 2 ACUs: cost = $0.24/hr (8% savings)
# If avg utilization is 0.5 ACUs at night: significant savings

4. Storage Right-Sizing

bash
# Identify gp2 volumes (older, more expensive than gp3)
aws rds describe-db-instances \
  --query "DBInstances[?StorageType=='gp2'].{ID:DBInstanceIdentifier,Storage:AllocatedStorage,Type:StorageType}" \
  --output table

# Migrate gp2 to gp3 (20% cheaper, 3x baseline IOPS)
aws rds modify-db-instance \
  --db-instance-identifier prod-mysql \
  --storage-type gp3 \
  --iops 3000 \
  --storage-throughput 125 \
  --apply-immediately

# gp2 1TB: $115/mo; gp3 1TB: $92/mo = 20% savings on storage

Finding Idle Read Replicas

bash
# Find read replicas with near-zero traffic
aws cloudwatch get-metric-statistics \
  --namespace AWS/RDS \
  --metric-name DatabaseConnections \
  --dimensions Name=DBInstanceIdentifier,Value=prod-mysql-replica-2 \
  --start-time 2025-08-01T00:00:00Z \
  --end-time 2025-09-01T00:00:00Z \
  --period 86400 \
  --statistics Average \
  --output table

# If Average < 5 connections/day, the replica is likely idle
# Deleting an idle db.r6g.xlarge replica saves $316/month

Cost Optimization Summary

ActionTypical SavingsRisk
Graviton3 migration20–40%Low (zero app changes)
1yr Reserved Instances38%Low (commitment risk)
gp2 to gp3 migration20% on storageNone
Delete idle replicas$200–600/replica/moLow (verify traffic first)
Aurora Serverless v230–60% on variable loadLow for dev/staging
Key Takeaways
  • Graviton3 (r8g/m8g) migration delivers 20–40% cost savings with zero application changes — it's the highest-ROI database cost action on AWS.
  • Reserved Instances for stable workloads cut costs by 38–57% vs On-Demand — review your 12-month workload history before committing.
  • Migrating gp2 volumes to gp3 is free, instant, and saves 20% on storage costs.
  • Audit read replica connection counts monthly — idle replicas are the most common source of database waste.

Working with JusDB on AWS Database Cost Optimization

JusDB performs AWS database cost audits for engineering teams, identifying savings across instance sizing, Reserved Instance planning, storage configuration, and idle resource elimination. Our clients typically reduce database spend by 25–40% within 90 days without performance impact.

Explore JusDB Cost Optimization →  |  Talk to a DBA

Related reading:

Share this article

JusDB Team

Official JusDB content team