I was playing with a multi-AZ RDS the other day and noticed that I was burning money more quickly than I had anticipated/wanted, so I decided to go to a smaller instance size that wasn’t as expensive (until the environment was under production load performance wasn’t that important).
Maybe I should take a step back. AWS offers a service called RDS (that stands for Relational Database Service). The best description of this offering is straight from the AWS website: “Amazon RDS is a managed relational database service that provides you six familiar database engines to choose from, including Amazon Aurora, MySQL, MariaDB, Oracle, Microsoft SQL Server, and PostgreSQL. This means that the code, applications, and tools you already use today with your existing databases can be used with Amazon RDS. Amazon RDS handles routine database tasks such as provisioning, patching, backup, recovery, failure detection, and repair.”
Here’s the process to change the size of the multi-AZ RDS stack with zero downtime. Please note that your RDS environment must be multi-AZ. Obviously if you only have 1 server and turn it off…. you are going to have downtime 🙂 :
- Log into console
- Go to Services -> Relational Database Service
- Select Instances
- Select your “reader” instance:
- Choose Instance Action -> Modify:
- Select the size you want to change it to:
- Click Continue:
- Select “Apply Immediately” then click “Modify DB Instance”:
- In the RDS Instances window, wait for the instance Status to go from “modifying” to “available”:
- Now failover your current writer to reader status. Select your “writer” instance:
- Choose instance action -> failover
- Once the stack has failed over perform the same modification steps on the second RDS instances. Once that is complete failback the stack.
All of the standard caveats apply: If you are in production, you still need a maintenance window and you still need to notify your users/monitors/app teams 🙂
That’s it! Let me know if you have any questions!