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. RDS uses EBS volumes internally for persistent storage and there are different AWS RDS instance types.
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.
- Save days of work by automating your DR testing process
- Recover your entire instance to a production state in minutes
- Reduce storage costs instantly with N2WS AnySnap Archiver
Aside from using N2WS to schedule instances to shut down during off-peak hours, another way to save on costs with RDS, is to change the size of your RDS instances.
In this article, we’ll show you how to modify the size of an RDS instance manually using the AWS console. More specifically, we will modify the AWS RDS instance type from medium to micro using the AWS console as well as the AWS CLI.
Modifying AWS RDS instance types
In the following example, we’ll use a MySQL AWS RDS instance with a db.t2.medium RDS instance class.
aws rds describe-db-instances
You can change the RDS 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 AWS 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 to the AWS RDS instance. 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 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 of AWS RDS instances:
- Flexible backup policies and schedules
- Consistent database backup for SQL Server, Oracle, MySQL, MongoDB, etc
- Instance and data recovery across AWS regions in seconds
- “Pull” and “Push” based alerts and notifications
- Application consistent backup
- Automated backup based on Tags
- Resource Control, to turn off RDS instances on a schedule or on demand
Ezra is the Sr. Director of Alliances and Partners at N2WS with more than 10 years of experience. Ezra enjoys long bike rides, cultivating rare semi-succulents, and building complex aquatic ecosystems.
Related Reads