One of the most popular AWS services is the managed relational database offering known as Amazon Relational Database Service (AWS RDS). AWS RDS offers an on-demand available, scalable, cost efficient and easy to manage RDBMS in the cloud. AWS RDS uses EBS volumes internally for persistent storage.
Unlike EBS backed EC2 instances, RDS does not have a stopped state, so it will keep running until it is terminated by a user. Although RDS instance type modifications cause database downtime, if your application implementation permits, it can be a good option to optimize costs. For example, if you’d like to save on costs with RDS during off-peak usage, you may want to change the size of your RDS instance. In this article, we will show you how to modify the size of an RDS instance manually using the AWS console. More specifically, we will modify the RDS instance type from medium to micro using the AWS console as well as the AWS CLI.
- In the following wizard, we will use a MySQL RDS instance with a db.t2.medium instance class. Using the AWS CLI: aws rds describe-db-instances
- You can change the DB instance class from db.t2.medium to db.t2.micro by clicking on ‘Modify DB Instance’ under the ‘Actions’ tab, as shown below: aws rds modify-db-instance –db-instance-identifier akash –db-instance-class db.t2.micro –apply-immediately
- Select ‘Apply Immediately’ to instantly modify your DB instance, otherwise the modification will be performed in the following maintenance window. This shows you that your RDS instance is being modified:
- Once complete, your DB will be up and running with the modified db.micro instance. aws rds describe-db-instances
Backup Your RDS
It is also very important to backup your DB instance before performing any size changes. The database instance may fail to start as the result of an error, in which case you can recover the data with your backup. AWS RDS offers two kinds of backup solutions. One is with EBS snapshots, which is a point-in-time backup and allows you to recover data from the exact point in time when that snapshot was created.
The other option is with automated backups, where daily backups are performed at a predefined time so data can be recovered along with its transaction log, RDS ensures data recovery from any point in time to provide better backup solutions. N2WS Backup & Recovery (CPM) is an enterprise-class backup and disaster recovery solution for EBS volumes and RDS databases. It is available as a service, allowing you to register multiple AWS accounts. You can configure policies and schedules to take automated snapshot backups of RDS. Additionally, you can configure policies to remove old snapshots.
N2WS provides automated and regular backups using features like:
- Flexible backup policies and schedules
- Consistent database backup for SQL Server, Oracle, MySQL, MongoDB and more
- Instance and data recovery across AWS regions in seconds
- “Pull” and “Push” based alerts and notifications
- Application consistent backup
- Automated backup based on Tags.
Try N2WS Backup & Recovery (CPM) for FREE!