Search code examples
amazon-web-servicesrds

How to stop AWS RDS for longer duration?


I want to stop AWS RDS (MySQL) instance for longer duration, for about a month, I able to stop instance from console. However, RDS instance gets restarted after 7 days. I also looked into AWS documentation for related information regarding this. Link Here for doc. It seems maximum duration for which RDS can be stopped is 7 days after which it auto restarts. Is there a way where I can keep it stopped for a month?

Right now I am manually stopping the RDS once after every week. I can slightly automate this stop procedure via lambda function that will stop RDS instance if it is running.

I just want to know is there any other alternative approach that I can follow?

Thanks,


Solution

  • You can delete your rds instance and save a snapshot of it. Once you try to create a new instance from the snapshot specified as long as your instance name is the same your connection strings shall be the same.

    Amazon RDS instance endpoints will not change.

    Thus you can a a cron job or a lambda trigger that will create your instance from the previous snapshot. Then try to use lambda scheduled events.