Docs/Why does my stopped RDS database start again after 7 days, and how do I keep it stopped?

Why does my stopped RDS database start again after 7 days, and how do I keep it stopped?

AWS restarts a stopped RDS instance after seven days. Detect the automatic start with the AWS CLI and keep the database stopped with a schedule.

Detect the automatic restart

RDS records an event when it starts an instance because it exceeded the maximum time allowed in the stopped state. List the events of the last seven days (10,080 minutes):

aws rds describe-events \
  --source-type db-instance \
  --source-identifier staging-db \
  --duration 10080 \
  --query 'Events[].[Date,Message]' \
  --output table

Keep it stopped with SnoozeDB

  1. Move the database to Managed resources.
  2. Assign the Always off schedule.
  3. When AWS starts the instance after seven days, the scheduler sees a running instance outside any active window and stops it again.
  4. When someone needs the database, start it temporarily from the dashboard or with /snoozedb-start in Slack.

Other options

  • If the database is not needed for months, a final snapshot followed by deletion removes instance and provisioned storage costs; you pay snapshot storage instead.
  • Aurora clusters also restart after seven days. SnoozeDB does not schedule Aurora; use aws rds stop-db-cluster or Aurora Serverless v2 auto-pause.