Many people may already be aware that AWS EC2 reserved instances are important for AWS cost optimization. To get the most out of them, however, you need to have a more in-depth understanding of how they actually work.
The basics of AWS EC2 reserved instances
Reserved instances are essentially bundles of services purchased in advance for a discount. This can be anything up to 75% on the on-demand price. Reserved instances are issued for periods of either 12 or 36 months on a “use-it-or-lose-it” basis. In other words, there is no option to roll-over any unused capacity.
Understanding AWS EC2 payment options
Although we described reserved instances as being “purchased in advance”, there is actually a bit of nuance here. Basically, once you commit to a reserved instance, you have to pay for it, but you have three different ways to do so (Calculate EC2 reserved instances).
Full upfront payment – This option will generally get you the biggest discount, but it may not do wonders for your cash flow.
Partial upfront payment – This option will often get you a smaller discount, but it can make it easier to find the funds to make the down payment. You then have to budget for ongoing usage but at a discounted rate.
No upfront payment – This option typically gets you the lowest discount, but it can make it much easier to manage your cash flow. You just have to budget for ongoing usage at a discounted rate.
For the sake of completeness, your billing is based on hourly usage, however, the degree of exactness with which your hourly usage is calculated will depend on various factors, particularly which operating system you use. With Linux/Unix instances usage is calculated to the second, whereas with Windows instances it is rounded up to the nearest hour.
Setting the reservation terms
The reservation terms determine the instance(s) to which the discount will be applied. It’s really important to think carefully about your usage patterns so you can get the very best value out of reserved instances.
For example, let’s say your workload consists of about 80% regular, predictable tasks and 20% irregular tasks, for which there is a bit of flexibility. In this situation, it will probably make the most sense to use reserved instances for your regular tasks and undertake the flexible tasks when you can buy spot instances.
Understanding the concept of offering class
Reserved instances come in two basic forms, standard and convertible. Standard reserved instances only offer a very small degree of flexibility to change the terms of the reserved instance. For example, you might be able to change the size of an instance but not the instance type. Convertible reserved instances can be exchanged against other convertible reserved instances and thus give you much more scope to alter your reservation terms. For example, you can update the instance type, scope and tenancy form.
Please note, however, that this flexibility comes at a price. Convertible reserved instances typically offer smaller discounts than standard reserved instances. Please also note that you cannot use this system to get a “back-door refund” of a reserved instance by exchanging your existing reserved instance a lower-priced option. You will, however, have to pay the difference if you opt for a more expensive option.
The basics of reservation terms
Most of the factors involved in the reservation terms are fairly self-explanatory. Choosing the right one for you will therefore essentially depend on you taking the time to analyze your usage effectively so that you pick the right option for your needs. There is, however, one specific factor that is worth a closer look.
Region versus availability zone
Anyone familiar with AWS will probably be only too familiar with the importance of choosing the right region. This certainly applies to AWS EC2 instances in general. With AWS EC2 reserved instances, however, there is a bit of an extra twist. This is that you can choose between a reserved instance for a given region or a reserved instance for one or more selected availability zones within a region.
The benefits of regional reserved instances
Probably the most obvious benefit of regional reserved instances is that you have the flexibility to apply them to any availability zone you choose. What may be less obvious is that this can also give you more flexibility with instance sizing. Basically, if you buy a regional reserved instance of a Linux or Unix instance type, the reserved instance can be applied to any size of instance within that type.
The benefits of availability zone reserved instances
If you opt to buy an availability zone reserved instance, then you are basically giving up flexibility for security. Specifically, Amazon will give you a guarantee that they will supply the reserved capacity at any given time. This means that availability zone reserved instances may be the best option for occasions when you just cannot risk your EC2 instance being unavailable.