Article Resource May 23, 2017

Amazon RIs Demystified: How to Allocate Costs of Your Reserved Instances

AWS Reserved Instances are a cost-efficient alternative to the on-demand pricing model for practically any cloud user with steady, predictable workloads. But they’re a particularly useful cost-saving mechanism for Amazon customers with consolidated monthly cloud bills.

Grouping all your linked accounts into a single master bill can increase the utilization of your Reserved Instances—by opening them up to a wider available resource pool.

This makes consolidated billing an effective way for prolific cloud users, such as large-scale enterprises, digital agencies, managed service partners (MSPs) and value-added resellers (VARs), to get the most out of Amazon RIs, helping them to reduce costs and increase profit margins.

But here’s the problem…

The Reserved Instance costs on your monthly AWS bills can be difficult to interpret. What’s more, they may not be allocated in the way you expect. This can present significant challenges to cloud financial management.

In this post, we take a look at how Reserved Instances are represented on your monthly AWS bills, the cost allocation issues this presents, and finally the approaches you can take to correctly apportion costs.

But, before we dig a little deeper, let’s briefly recap on the basics of Reserved Instances.


What Are Reserved Instances?

Reserved Instances are a financial commitment to reserved discounted capacity over a fixed term of one or three years. The important thing to remember about Reserved Instances is that they’re a billing construct rather than a physical instance, where you effectively purchase a credit against the instance type you specify.

You can determine the scope of a Reserved Instance so it applies to either a specific Availability Zone or an entire AWS Region. Regionally scoped Reserved Instances offer more flexibility, as they can apply to any matching instance type within a Region. However, unlike those scoped to an Availability Zone, they do not guarantee your capacity reservation.

Whenever you launch a machine that matches the specifications of your Reserved Instance, Amazon will apply the credit to your running instance in place of the on-demand rate. Each Reserved Instance credit can only be applied to a single running machine at any one time. However, during any period where you have no active matching instances, your Reserved Instance credit will remain unused and go to waste. This underlines why it’s so important to utilize your reserved capacity as much as possible—in order to achieve the maximum possible discount and return on investment.

The level of discount you can expect to achieve also depends on the attributes you specify at the time you make your purchase. These include:

  • Instance type: The compute resource you want to reserve
  • Length of term: Either one or three years
  • Platform: The operating system (OS)
  • Region: The AWS region in which your Reserved Instance will apply
  • Tenancy: A standard EC2 instance or single-tenant hardware
  • Amount of upfront payment: All upfront, partial upfront or no upfront
  • Reserved Instance type: Standard or Convertible

The fundamental difference between Standard and Convertible Reserved Instances is the level of flexibility you can expect. With Standard Reserved Instances, what you reserve is what you get. By contrast, at any time during the term, you can exchange a Convertible Reserved Instance for another Convertible reservation with different specifications. This can include a different instance family, scope, platform or tenancy.

Standard regionally scoped Linux reservations are more adaptable than those hosting Windows or enterprise Linux distributions. This is because AWS applies your Reserved Instances to any instance size in the same family as the Linux instance you specify.

It uses a normalization factor to apportion your credits, whereby it can spread your Reserved Instances across a combination of smaller instance sizes or use it to reduce the cost of running a larger instance.


How Do Reserved Instances Work?

So why exactly do Amazon RIs present such a challenge to cloud cost allocation?

Much of it comes down to the way Reserved Instances work.

If you purchase a Reserved Instance for your own use, Amazon can still apply your reservation to a matching instance in any of your company’s linked accounts. Although it gives first priority to the account that made the purchase, other accounts may still consume your Reserved Instances even when you have a matching running machine.


How AWS Allocates Reserved Instances

If AWS finds a single matching instance in the account that bought the reservation, they will apply the Reserved Instance to it. However, if AWS finds multiple matching instances in the account that bought the reservation, they will apply the Reserved Instance to one of them at random.

If AWS can’t find any match in the account that bought the reservation, you can apply the Reserved Instance to any matching running machine in the same account family. Additionally, if they can’t find a match in any of your linked accounts, the Reserved Instance remains unutilized.

AWS then repeats the above process every hour.

As Amazon only repeats the allocation process once an hour, you could launch a machine that matches one of your Reserved Instances, but still pay the on-demand rate for up to an hour before the reservation gets reallocated to it. In the meantime, another machine in another account could be benefitting from the Reserved Instance credit that you have paid for. This will be reflected in your AWS bill at the end of the month.

The following example from AWS shows a sample section of a monthly AWS bill relating to the use of t2.small instances in one Availability Zone, where:

  • The Payer Account has 3 active Reserved Instances (2160 hours)
  • Linked Account 1 has 3 active Reserved Instances (2160 hours)
  • Linked Account 2 has no active Reserved Instances (0 hours)
AWS bill example
Sample AWS bill from the AWS website

Even though Linked Account 1 has used only 1820 hours of its Reserved Instance capacity of 2160 hours, it has still paid for 50 hours’ use of a t2.small instance at the on-demand rate.

Some of these hours will be the result of periods when the account was running more than three t2.small instances at the same time. However, the rest will be partial hours during which at least one of the Reserved Instances was already allocated to Linked Account 2. What’s more, as the above screenshot shows, LinkedIn Account 2 has benefitted from a total 340 hours of Reserved Instance credit purchased by Linked Account 1—where at least 290 of those hours would’ve been allocated when LinkedIn Account 1 was running fewer than 3 t2.small machines.

For a simple example such as this, it would be relatively straightforward to reallocate the costs shown in your consolidated bill to reflect the intended purpose of your Reserved Instance purchases. But if you’re a large-scale enterprise, with a large portfolio of accounts, resources and Amazon RIs, this becomes a complex and time-consuming undertaking.


How Do You Allocate Reserved Instance Costs?

The approach you take depends on the needs of your organization and whether you decide to use Amazon’s blended rates or unblended rates.


Blended Rates

In simple terms, the blended rate is the rate that reflects the average of on-demand and Reserved Instance costs for each usage type. It is calculated by dividing the on-demand costs of a usage type by ALL hours it has consumed (both reserved and on demand), as follows:

However, the rate excludes the actual cost of purchases of Amazon RIs. Nevertheless, it is still a useful indicator as to whether you’re making effective use of Amazon RIs. And, for some organizations, it can play a useful role in cost allocation.


Role in Cost Allocation

By using blended rates and blended costs, you can simplify the process of Reserved Instance allocation. All accounts would benefit from your reservations and pay the same rate. However, the real headache would be distributing the purchase cost of your Reserved Instances.

Some MSPs, digital agencies and Value-Added Resellers (VARs), for example, may prefer to use blended rates where they purchase Reserved Instances on their customers’ behalf. By implementing a proactive Reserved Instance purchasing strategy, they can both increase their profit margins and pass on savings to their customers at the same time.


Unblended Rates

The unblended rate is the rate that your line item would have been charged if it were in an unconsolidated account. Although unblended costs are a more accurate calculation of your hourly instance charges, they do not reflect the underlying purchasing intention of your Reserved Instances whenever they have been consumed by another account.

Just as with other AWS resources, you should tag your reservations to help you map your Reserved Instance costs to your own accounting system. Nevertheless, while tagging helps you to allocate the cost of Reserved Instance purchases, they’re unable to address the problem of the way reservations are applied to consolidated accounts.


Role in Cost Allocation

Unblended costs will suit AWS users that want to promote more accountability for cloud usage within their organization through clear chargeback or showback. Similarly, they’re a better fit for digital agencies, MSPs and Value-Added Resellers (VARs) who want a more direct way of allocating costs to their customers.

However, when you use unblended rates, you’ll still need to reallocate Reserved Instances from accounts that did not originally purchase them to the accounts that did.

But that’s not all.

You’ll also need to normalize the line items where you’ve reallocated Reserved Instance credits elsewhere. In other words, you’ll need to apply the on-demand rate to those instance hours consumed by other accounts that weren’t originally intended to use the reservation.

Where you have a complex enterprise cloud environment, the manual work involved could potentially run into hundreds of reallocation tasks. Moreover, you’ll need to thoroughly check all your figures to ensure they balance, as the whole process is highly prone to human error.

So what’s the solution?


Cost Allocation Reports and Tools for Amazon RIs

Time is money. So it makes much more sense to use an automated solution that does the financial legwork for you.

Cloud cost management systems generally include cost allocation reports and tools that offer clear insight into your spending across your cloud environments. Some also include the functionality to programmatically create and schedule invoices to clients, business units, departments, and application owners.

What’s more, these offerings generally include a whole raft of other features to help you make efficient use of your cloud infrastructure, such as resource resizing, Reserved Instance purchasing and cloud best practice recommendations.

In other words, they not only address the significant challenge of manual cost allocation, but also provide a fully comprehensive set of cloud optimization tools and reports—giving you the visibility and processes you need to keep your monthly cloud bills in check.


Manage Your Amazon RIs (and Your Cloud Infrastructure)

Our experts have seen it all—from hundreds of siloed accounts to millions of dollars of resource waste. Get your cloud costs and RI purchases under control with a 30-minute CloudCheckr demo.