RDS free storage is dropping steadily and will run out in 5 days. What do you do?

BeginnerScenarioData and databases
Answer

Situation read → A full disk takes the database into storage-full state and it stops accepting writes. Buy time first, then find out what's growing.

What I'd do →

  1. Enable storage autoscaling with a sensible maximum (or increase allocated storage; it's online for most engines).
aws rds modify-db-instance --db-instance-identifier prod-db --max-allocated-storage 2000 --apply-immediately
  1. Find the growth: table and index sizes, and in PostgreSQL also dead tuples (bloat), WAL kept by an inactive replication slot, and temp files.
SELECT slot_name, active, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) AS retained
FROM pg_replication_slots;
  1. Fix the cause: drop the abandoned slot, tune autovacuum, archive old data, or set log retention.
  2. Alert on FreeStorageSpace below 20% and on its rate of decrease.

Why → Note that RDS storage can only grow, not shrink, so fix the cause instead of adding space forever.

Interview tip → An inactive replication slot (often from a removed DMS task) is a classic hidden cause; mention it.

All Real-World Interview questions Roadmap: Interview readiness

More on Data and databases