AWS RDS Cost savings using INVOKE Cloud - a case study

by INVOKE Team

Posted on April 16, 2019 at 12:00 AM

AWS RDS Cost savings

INVOKE Cloud team always explores ways to reduce cloud hosting costs. This time interestingly, one of our clients question was, "we are seeing unexpected RDS costs because RDS instances are staying in running status after a week, how can INVOKE application address this issue?"

"Unexpected RDS costs" grabbed our attention. We know that INVOKE already supports bringing RDS instance up & down, so supporting this requirement shouldn't be an issue. Before jumping into making a suggestion, we tried to understand what it means when a client says "staying in running status after a week".

The case is: client has couple of RDS instances being used by the QA team. These are needed for couple of days every few weeks while running sprint tests. After QA, client will shut RDS down, but somehow (which we know why) RDS are turned on and the client was charged for the usage.

What is RDS?

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and re-sizable capacity while automating time-consuming administration tasks such as hardware provisioning, database set up, patching and backups. It frees focus on your applications so that you can give them fast performance, high availability, security and compatibility they need. Amazon RDS is available on several database instance types - optimized for memory, performance or I/O.

"Amazon RDS is available on several database instance types" is key information related to the costs clients noticed. RDS is in simple words another EC2 instance with database server and related software installed and managed by AWS. Like any EC2 instance, software on these instances need to be kept up to date for security reasons.

Why RDS is turned on though client turned it off?

We explained to the client why RDS instances are powering on. The reason is because of the AWS RDS " maintenance window ". AWS requires at least 30-minute window in your instance weekly schedule to confirm that all instances have the latest patches and upgrades. During the maintenance window, tasks are performed on clusters and instances. For the security and stability of your data, maintenance can cause instances to be unavailable.

During this maintenance window, if the RDS instances are not in a running state, they will be brought up, apply patches but AWS will not turn them off. If RDS users don't pay enough attention and turn them off after this maintenance window, this will rack up the bill irrespective of whether applications are making queries to RDS instance or not.

One good thing is, we can control the maintenance window with RDS. AWS needs 30 minute window per week to check and apply patch (if need). The following screenshot describes how to configure RDS maintenance in AWS console. This example has a maintenance window scheduled between 8 AM and 8:30 AM. We need to have the capability to shut RDS down after the maintenance window, for example at 8:40 AM to reduce AWS RDS costs .

AWS RDS maintenance window configuration


How INVOKE can address this issue? As we discussed at the beginning of the this blog, INVOKE supports RDS power on/off as part of domain dependent resources. We can use similar approaches.

After login to INVOKE admin console, create separate domain just for RDS instance(s) alone.

  1. Step 1: Create a separate domain just for RDS instance(s) alone.

AWS RDS Configuration with INVOKE Cloud

  1. Step 2: Associate all your RDS instances

Reduce AWS RDS costs

  1. Step 3: Associate existing 'Shutdown Schedule' to this domain. Make sure the shutdown in associated template is 5-10 minutes after the maintenance window ends. This way, you can achieve the best RDS cost savings while allowing AWS to complete its maintenance.

In our example, the RDS maintenance window is scheduled between 08:00 AM to 08:30 AM. Which means INVOKE shutdown template associated with this domain should be configured at around 8:40 AM.

AWS RDS Cost optimization

INVOKE supports the ability to add multiple startup/shutdown schedules and gives flexibility for our users to configure different schedules based on their working needs with couple of clicks.

Though INVOKE solves RDS maintenance window issue with simple setup, we strongly believe that more than one solution exists for any issue (specially in IT sector) and each solution has its strengths and weaknesses. Based on this principle, we did educate our users with other possible solutions like snapshot the RDS and deploy RDS only when needed, which comes with drawback like delay in database creation and availability and so on.

In summary, RDS start/stop and supporting AWS maintenance window for RDS maintenance is effortless while using INVOKE and keeps cloud costs low.

Have any questions on cloud savings? Talk to us, we could help you.

Using schedulers to save cloud hosting costs? you should read the blog AWS EC2 Schedulers - not good enough tool to reduce AWS bill

READY TO SAVE ON CLOUD COSTS?  Get Started for free