Controlling AWS Costs with Reserved Instances
For many organizations, switching from on-demand instances to reserved instances can significantly cut back on costs, make cloud workloads more efficient and -- most importantly -- prevent any surprise charges from appearing on their bill.
For many years now, cloud vendors have been trying to convince IT pros to run as many workloads as possible in the public cloud. While there are some compelling arguments in favor of migrating some workloads to the cloud, the cloud is not without its disadvantages.
One such disadvantage is that public cloud costs are sometimes unpredictable. On occasion, I myself have received surprise bills from public cloud providers when I used more resources than I realized within a given month.
I will be the first to admit that these surprise bills haven't been huge. I don't run any production workloads on Amazon Web Services (AWS), and that helps to control costs. Even so, the simple fact that I have incurred unexpected costs while performing lab-based activities within AWS' free tier underscores the fact that the costs of operating in the public cloud can be wildly unpredictable.
One way that organizations may be able to reduce costs while also making those costs more predictable is through the use of reserved instances.
Normally, when you create an AWS instance, that instance is billed at what AWS calls the on-demand rate. The on-demand rate is based on a number of different factors. There is a base price per hour for operating an instance, and that rate is based on the instance size and operating system. An instance also commonly incurs additional costs related to network transfers or storage consumption. You can find AWS' on-demand pricing here.
Although AWS does provide tools to help administrators estimate costs -- like the AWS Price List API, which launched in late 2015 -- a better option may be to use reserved instances. Unlike on-demand instances, which can be created or deleted at will, a reserved instance must be purchased for either a year or three years. In exchange for committing to using an instance for a predetermined period of time, AWS bills the instance at a flat rate. If this rate is broken down into a cost per hour, then the hourly cost is substantially less expensive than the on-demand rate. You can find the pricing for reserved instances here.
AWS gives its customers a degree of flexibility when it comes to paying for a reserved instance. The payment options vary by instance type, but AWS typically offers the option to pay for the instance upfront (with no monthly fee), to pay part of the cost upfront with the balance being rolled into a monthly fee, or to pay for the instance on a monthly basis.
Because reserved instances are billed in a way that differs from on-demand instances, AWS provides a report that customers can use to determine how effectively their reserved instances are being used. This report, which is called the EC2 Reserved Instance Utilization Report, is accessible by logging in to the AWS console, clicking on your account name and selecting the My Billing Dashboard option from the drop-down menu, as shown in Figure 1.
When the Billing Dashboard appears, select the Reports container to access the report. You can see the available reports in Figure 2 below.
If a reserved instance is found to be underutilized, then an organization may wish to dispose of the instance. AWS does not allow its customers to cancel their reserved images, but unwanted reserved instances can be sold to other AWS subscribers in the Reserved Instance Marketplace (although there are some limitations).
Recently, AWS added a new report to its Cost Explorer, called the RI Coverage Report. This report is designed to determine how many of an organization's instance hours are not attributed to a reserved instance. The report might be thought of as being the opposite of the EC2 Reserved Instance Utilization Report. While the EC2 Reserved Instance Utilization Report is commonly used to determine whether an organization is actually using all of its reserved instances, the RI Coverage Report can be used to find out if an organization has enough reserved instances.
The advantage to running the RI Coverage Report is that it can help make an organization's costs more predictable. Reserved instances are essentially billed at a flat rate. In other words, a reserved instance's cost is not based on whether or not the instance is running. Running a reserved instance incurs the same cost as it would if the instance were stopped.
Since non-reserved instances are usually billed at a higher rate than reserved instances, it makes sense for an organization to determine whether any of its non-reserved instances might be good candidates for a transition into a reserved instance. The RI Coverage Report can help an organization spot on-demand instances that are consistently in use each month. By transitioning such instances into reserved instances, the organization might not just save money, but may also be able to better predict its monthly AWS bill.
Brien Posey is a 20-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.