Reserved Instances and EC2 Instance Size Flexibility

Flex Reserved Instances (RIs) are an AWS feature that provide you with optimized savings on certain types of EC2 RIs. This topic answers the following questions:

  • What are Flex RIs?
  • How Do I Use Flex RIs?
  • How Can CloudCheckr Help Me Optimize My RI Usage?

What Are Flex RIs?

A Flex RI is any RI that you can modify as many times as needed—as long as you stay within the instance family. In addition, when you stay within the one instance family, you can share the benefits of the RI among other sizes in the family. The RIs must have the following characteristics:

  • Amazon Linux only
  • Regional RI only (not an Availability Zone RI)
  • Default tenancy only

How Do I Use Flex RIs?

In the past, a specific RI size and type would give you discounted pricing only on one type of EC2 instance. For example, if you owned a 1-year RI on an m4.large Linux instance but were only running m4.xlarges because your compute needs suddenly changed, you could not easily apply the m4.large RI to another size unless you took rebalancing actions.

AWS' new feature introduces the concept of an RI footprint. To understand this, you should first consider that AWS has created a normalization factor for all the RIs in an instance family. The normalization factor is as follows:

If you take an m4.small as an example, using the normalization factor you are easily able to understand how it relates (in size and cost) to all the other sizes in its family. If an m4.small is 1 then, an m4.medium is 2x as large, a 32xlarge is 256x as large, and a nano is 0.25x as large.

The key takeaway from this is that the RIs within a family are therefore completely interchangeable. Any RI can give you discounts on any size—the discount will be proportional to the normalization factor.

You can see an example of instance equivalents here:

Your RI Footprint

Because all your family RIs are going to be lumped together, you will have to think about them not as a collection of individual pieces—for example, 10 medium RIs, 5 large RIs—but instead as one large group that has an impact on your entire EC2 usage.

Going forward, if you have 10 medium RIs and 5 large RIs, your footprint will be 40:

10 mediums = 10 x 2 =  20

5 larges = 5 x 4 = 20

Footprint = 20 + 20 = 40

Your Footprint Gives You Flexibility With RI Coverage

Grouping RIs by footprint gives you a target number that you need to cover. In our example, the footprint is 40, so using the normalization factor as a guideline, you can use any combination of RIs to make up a footprint of 40. You'll see that you can use large or small RIs, but smaller RIs have the advantage of giving your greater granularity for future RI coverage.

10 larges = 10 x 4 = 40

40 smalls = 40 x 1 = 40

80 micros = 80 x 0.5 = 40

You Can Now Take Advantage of Partial Savings

Another aspect of RI flexibility is that you get partial savings when an RI partially matches an instance you are running. This aspect is significant because you are no longer chasing instance sizes — as long as you have some member of the family in an RI, you will get some percentage of RI coverage.

The screenshot shows an example:

Let's say you are running a 2xlarge with an On Demand rate of $1.00/hr, and the only RI you own is an xlarge for $0.25/hr.  With the new normalization factor (and equivalencies shown at the beginning of this article) you can see that an xlarge is equivalent to half of a 2xlarge, and thus the RI can cover half of the hour at the xlarge RI rate of $0.25.  The remaining half of the 2xlarge—another xlarge—will then be charged the xlarge On Demand rate of $0.50. The result is that you have an effective hourly rate of $0.75/hr, a 25% discount over the original On Demand rate of $1.00/hr. This is all calculated for you by AWS and the effective rate is reflected in your CloudCheckr data. 


How Can CloudCheckr Help Me Optimize My RI Usage?

CloudCheckr has two EC2 RI Recommendation reports that take your RI footprint into account when making suggestions. The reports can tell you the optimal number of RIs to buy to get full coverage.

CloudCheckr's algorithm makes recommendations to purchase the smallest available RI size to ensure you have the most flexibility as your deployment changes over time.

You can see the recommendations when looking at following reports:

EC2 RI Purchase Recommendations (by Instance)

EC2 RI Purchase Recommendations (by Frequency)


How did we do?