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.
Short answer
AWS automatically starts an RDS DB instance that has been stopped for seven consecutive days, so it does not miss required maintenance. A one-off
aws rds stop-db-instance cannot prevent this. A scheduler that reconciles the expected state stops the instance again at its next pass: in SnoozeDB, assign the Always off schedule. Developers can still start it temporarily when they need it.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 tableKeep it stopped with SnoozeDB
- Move the database to Managed resources.
- Assign the Always off schedule.
- When AWS starts the instance after seven days, the scheduler sees a running instance outside any active window and stops it again.
- When someone needs the database, start it temporarily from the dashboard or with
/snoozedb-startin 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-clusteror Aurora Serverless v2 auto-pause.