What are AWS Reserved Instances?

Read More >

AWS Reserved Instance (RI) is a discount pricing model from Amazon Web Service (AWS). It’s not a special type of computing instance, rather a way to minimize infrastructure costs.

History

Amazon’s pay-as-you-go pricing model was a novel introduction to cloud computing back in the mid-noughties. Initially, AWS customers could use EC2 instances without any upfront cost and pay a per-hour usage fee. There would be no cost if an instance was not running. This saved companies from making initial investments in hardware or labor, and there were no depreciation and maintenance costs involved. As Amazon put it, the pay-as-you-go model was like that of utility services.

The on-demand pay-per-hour model is still available, and companies can choose to use that. However, Amazon introduced Reserved Instances back in 2009, based on customer feedback, and it was a significant leap in cost savings.

With this model, AWS customers could commit to using an EC2 instance of a specific instance family (e.g., m4) in a particular region (e.g., us-east-1) for one of the supported operating systems (e.g., Linux/UNIX) either in a dedicated or a shared hardware host for a one or three-year period. In return, the customer would pay a significantly lower per-hour rate for running that instance. Amazon called this commitment “Reserved Instance” because the EC2 instance was reserved for a discount. This “commitment” was not tied to any particular EC2 machine: a customer buying an RI could apply it to any machine that fit the criteria.

On a broad level, It was (and still is) an age-old business practice of giving discounts to long-standing customers or customers purchasing in bulk.

Attributes

Since RIs are billing discounts, companies have to purchase an RI before applying it to an instance that meets the RI’s criteria. For example, if someone bought an RI for the m4 instance family and later upgraded their EC2 instances to another instance family, the RI would no longer apply to the upgraded EC2 machines. This is because the discount was applicable to m4s only. AWS would then charge the upgraded machines at a standard on-demand rate, and the customer would have to pay for the unattached RI.

Obviously, this is not an ideal scenario, and that’s why AWS customers need to be aware of the attributes that control an RI’s price and its discounts.

Instance Type

An instance type is made up of two parts: the instance family (like m4, r5, etc.) and the instance size (like xlarge, 8xlarge, etc.). An AWS customer can purchase an RI for a specific instance class. Once purchased, the instance class cannot be changed (although we will see later, there is a type of RI where you can exchange the RI for another RI with a different instance class). However, it’s possible to merge or split the RI for larger or smaller instance sizes within the same class, provided the operating system is Linux or UNIX, and the total instance size footprint remains unchanged. For example, a c5.4xlarge RI can be split into four c5.xlarge RIs. Similarly, four c5.xlarge RIs can be combined into a single c5.4xlarge RI.

Scope

Reserved Instances have two geographical scopes. They can be purchased for a specific AWS region or a particular availability zone (AZ) within a region. The first type is called regional RI, and the second one known as zonal RI.

A regional RI cannot be used in any region other than the one it was purchased for. Regional RIs can be applied to instances in any availability zone within that region.

Zonal RIs apply to instances running in a particular AZ only. It cannot be used for machines running in another AZ. Because of higher restrictions, zonal RIs offer more discounts.

Platform

The third variable in RI pricing is the operating system. Reserved instances purchased for a Windows or RHEL machine will cost more than the one bought for an Amazon Linux box. Some flexibility options like modifying the instance size of an RI are available for Linux/UNIX systems only.

Tenancy

Tenancy dictates the runtime environment for a VM. A dedicated tenancy means an EC2 server will run on a physical host with no other VMs running on it. A shared tenancy means the EC2 machine will share the underlying physical host with other VMs. Dedicated tenancy RIs cost more than the shared ones.

Term Commitment

When purchasing an RI, AWS customers generally commit to either one or three years, known as the RI’s term. This is a block of time the customer agrees to pay for the RI and own it whether or not using it. Once this term is over, any EC2 machine running with the RI will be charged at the on-demand rate. A longer payment term will attract a lower hourly rate. As we will see later, RI terms can now be lower than one year.

Payment Option

There are three ways customers can pay for an RI when buying it:

  1. All Upfront: Pay the total amount for using the instance at a reduced hourly rate for the entire payment term. Paying upfront means the hourly rate becomes $0.
  2. Partial Upfront: Paying a portion of the total amount due at the time of purchase and paying for the remaining hours at a reduced hourly rate.
  3. No Upfront: Not paying anything upfront at the time of purchase, but paying a reduced hourly rate (higher than the other two options) during the payment term.

To show how RIs can save costs, let’s consider an AWS customer running a Linux c5.xlarge instance in the us-east-2 (Ohio) region. The on-demand rate for this instance type is $0.17/hour at the time of writing (November 2020).

If the company buys an RI for this instance and pays no upfront fee, the hourly rate drops to $0.108 for a one-year commitment. For a three-year commitment with no upfront payment, the hourly rate comes down to $0.070, a 59% price drop.

In other words, the longer the commitment or higher the upfront pay, the lower the hourly rate.

Types

There are two types of Reserved Instances. They differ in the way customers can modify their properties.

The first type is what AWS originally introduced: it’s called Standard Reserved Instance. Standard RIs are more restricted but offer higher discounts. Customers with Standard RIs can change the instance size within the same instance family for bare metal Linux or UNIX operating system. A regional Standard RI can also change its availability zone within the same region for Linux and Windows machines. Also, the geographical scope can be changed from regional to zonal and vice versa.

The second type is called Convertible Reserved Instance. These are more flexible but offer less discount. Customers with Convertible RIs can exchange it for another Convertible RI during its term. The new RI can have a different instance family and size, OS, tenancy, or payment term, but have a fixed region that cannot be changed during its term. AWS also stipulates several conditions for exchanging Convertible RIs It’s also possible to modify the attributes of a Convertible RI. These attributes are the same as those for Standard RIs.

Marketplace

Although Reserved Instances saved enterprises billions of dollars over the years, some organizations still found it inflexible when it came to payment terms. Only two were available (either one year or three years), but sometimes an RI was needed for a shorter period. Also, existing RIs were often rendered idle when the underlying infrastructures were removed or upgraded. Cases like these saw companies still paying for Reserved Instances they did not need.

The response was AWS Marketplace, a virtual platform for buying and selling Standard Reserved Instances. This is the same place where customers buy RIs from AWS. With the Marketplace now being open for all, companies can put up their idle RIs for sale for the remainder of the terms. Other AWS customers can now search for and buy RIs from third-parties with payment terms as low as one month. This allows enterprises to align their RI needs better. For example, a seller can “break up” its unused large RI into smaller “chunks” and offer those as individual RIs for sale. An AWS customer expecting a seasonal spike in its workload can look for RIs that matches its instance types and usage timeframe and buy one or more from the seller.

There are few requirements to sell in the AWS Reserved Instance Marketplace.

First, a company needs to register to become a seller in the RI Marketplace, and for that, it needs to have a US bank account.

Second, only EC2 Standard RIs can be sold and bought in the Marketplace. The seller needs to own the RI for at least one month before putting it up for sale, and the RI needs to have at least one month remaining in its term. If the RI was purchased with an All Upfront payment option, AWS needs to receive that payment before the RI can be listed for sale.

Thirdly, A seller can sell a maximum of 5,000 RIs or $50,000 worth of RIs in a year, although it can request AWS to increase the limit.

Fourth, there’s no guarantee that an RI would sell in the Marketplace. AWS will retain 12% of the total upfront price of the sold RI as a service fee in a successful sale. The minimum price an RI can be sold is $0.00. Once an RI is listed for sale, it can’t be modified, although it’s possible to cancel the listing as long as it’s in the “active” state.

Other AWS Resource Types Using RIs

Although Reserved Instance was initially available for EC2 only, AWS has gradually introduced it for other resource types, including Amazon RDS, Amazon ElastiCache, and Amazon Redshift.

Amazon RDS Reserved Instances work similarly to EC2 Reserved Instances. For database engines like MariaDB, MySQL, PostgreSQL, or Oracle BYOL, RDS RIs are also size-flexible. Size flexibility allows automatic applying to all instance sizes within the same instance family. For example, if an AWS customer buys one multi-AZ db.m4.large Reserved node, AWS can automatically apply that to two db.m4.medium nodes in a multi-AZ setup.

With Amazon Redshift, a single cluster can have both reserved nodes and on-demand nodes. Also, different nodes can be purchased under different offerings. This arrangement allows for flexible scaling. For example, a customer running an eight-node non-production cluster can decide to purchase two extra nodes at an on-demand rate for running a proof-of-concept for three months. The other existing nodes will run with reserved capacity. This can save costs as the customer does not have to invest in buying a long-term reservation. Once the PoC is successful, the company can decide to buy four extra reserved nodes for its sixteen-node production cluster. These nodes will be purchased under a different reservation than the ones bought before. If only two nodes are added to the production cluster, they will be covered by the newly purchased reservation, leaving the rest two for future growth.

Despite being very similar to EC2 reserved instances, RDS, Redshift, or ElastiCache Reserved nodes have one significant difference: they cannot be bought and sold in a Marketplace, nor is there a “convertible” option.

Another Discount Model: Savings Plan

In 2019, Amazon introduced another billing discount called Savings Plan. It’s similar to Reserved Instances because customers get a discounted hourly rate (up to 72%) in exchange for a long term commitment.

With Savings Plans, AWS customers commit to spending a certain amount of money per hour for computing resources over a 1-year or 3-year period in exchange for a significantly reduced hourly rate. Savings Plans apply to computing resources like EC2, Fargate, or Lambda and not available for RDS, Redshift, or other resources. Also, Savings Plans cannot be bought and sold in a Marketplace.

Like Reserved Instances, Savings Plans also come in two types: EC2 Savings Plan and Compute Savings Plan.

EC2 Instance Savings Plan is like Standard RIs as it’s more restricted. Here, users commit to using a specific instance family in a particular region regardless of instance size, operating system, tenancy, or availability zone.

Compute Savings Plans are like Convertible RIs because they are more flexible. Compute SPs can be applied to EC2 instances, Fargate, or Lambda services for any instance family, size, AWS region, operating system, or tenancy.

Final Thoughts

Although Reserved Instances have great cost optimization benefits, its management can be a difficult task. That’s because RIs are not automatically applied when the underlying infrastructure changes. Since there is no automation, FinOps teams have to continuously monitor their usage, calculate the best possible combinations for optimal savings, and often have to keep buying or selling them in the Marketplace.

This is where solutions like Zesty’s can help. It provides a fully automated, AI-powered solution for Reserved Instance management that unlocks significant savings and eliminates the manual overheads of buying, selling, and exchanging RIs in the marketplace.

blogbanner1_320x480_CM