* Price calculations using AWS Price List API Show
Most AWS customers have at least heard of AWS Reserved Pricing. While the concept is popular mainly because of EC2 Reserved Instances, it actually applies to many other AWS Services. In this series, I’ll walk you through what to look out for and tips on how to save money by purchasing Reserved capacity in AWS. We’ll start with EC2. But don’t worry, this isn’t just another article on how to purchase EC2 Reserved instances! I’m including live calculations, examples, tips and a set of steps you can follow to save some real money in EC2…. First, what is Reserved Pricing?The concept is simple: commit to a 1 year or 3 year period for a particular AWS resource type and save up to 75% compared to the default pay-as-you-go On Demand pricing. Sounds good, doesn’t it? It’s a great way to save money, but the devil’s in the details (and there are many details to consider here). The concept applies to multiple AWS Services, such as RDS, EMR, RedShift, Elasticache and even DynamoDB. In this article, I’ll focus on EC2. While there’s no official statistic from AWS, I can tell from my experience (and from many reports out there) that EC2 is the service most AWS customers spend the largest portion of their bill on. If you reduce cost for EC2, you’ll make good progress towards reducing your overall AWS bill. How much? Here’s a basic example that compares a very common Reserved option (Standard, All Upfront) for a common EC2 instance type - an m5.large, in us-east-1. Feel free to choose a different instance type, region, or number of years. You can also hover on the chart area to see more details regarding savings. c1.medium c1.xlarge c3.2xlarge c3.4xlarge c3.8xlarge c3.large c3.xlarge c4.2xlarge c4.4xlarge c4.8xlarge c4.large c4.xlarge c5.large c5.xlarge c5.2xlarge c5.4xlarge c5.9xlarge c5.12xlarge c5.18xlarge c5.24xlarge c5d.large c5d.xlarge c5d.2xlarge c5d.4xlarge c5d.9xlarge c5d.12xlarge c5d.18xlarge c5d.24xlarge c6g.medium c6g.large c6g.xlarge c6g.2xlarge c6g.4xlarge c6g.8xlarge c6g.12xlarge c6g.16xlarge c6gd.medium c6gd.large c6gd.xlarge c6gd.2xlarge c6gd.4xlarge c6gd.8xlarge c6gd.12xlarge c6gd.16xlarge cc2.8xlarge cg1.4xlarge cr1.8xlarge d2.2xlarge d2.4xlarge d2.8xlarge d2.xlarge f1.16xlarge f1.2xlarge g2.2xlarge g2.8xlarge g3.16xlarge g3.4xlarge g3.8xlarge h1.16xlarge h1.2xlarge h1.4xlarge h1.8xlarge hs1.8xlarge i2.2xlarge i2.4xlarge i2.8xlarge i2.xlarge i3.16xlarge i3.2xlarge i3.4xlarge i3.8xlarge i3.large i3.xlarge m1.large m1.medium m1.small m1.xlarge m2.2xlarge m2.4xlarge m2.xlarge m3.2xlarge m3.large m3.medium m3.xlarge m4.10xlarge m4.16xlarge m4.2xlarge m4.4xlarge m4.large m4.xlarge m5.large m5.xlarge m5.2xlarge m5.4xlarge m5.8xlarge m5.12xlarge m5.16xlarge m5.24xlarge m5d.large m5d.xlarge m5d.2xlarge m5d.4xlarge m5d.8xlarge m5d.12xlarge m5d.16xlarge m5d.24xlarge m6g.medium m6g.large m6g.xlarge m6g.2xlarge m6g.4xlarge m6g.8xlarge m6g.12xlarge m6g.16xlarge m6gd.medium m6gd.large m6gd.xlarge m6gd.2xlarge m6gd.4xlarge m6gd.8xlarge m6gd.12xlarge m6gd.16xlarge p2.16xlarge p2.8xlarge p2.xlarge p3.16xlarge p3.2xlarge p3.8xlarge r3.2xlarge r3.4xlarge r3.8xlarge r3.large r3.xlarge r4.16xlarge r4.2xlarge r4.4xlarge r4.8xlarge r4.large r4.xlarge r5.large r5.xlarge r5.2xlarge r5.4xlarge r5.8xlarge r5.12xlarge r5.16xlarge r5.24xlarge r5d.large r5d.xlarge r5d.2xlarge r5d.4xlarge r5d.8xlarge r5d.12xlarge r5d.16xlarge r5d.24xlarge r5a.large r5a.xlarge r5a.2xlarge r5a.4xlarge r5a.12xlarge r5a.24xlarge r6g.medium r6g.large r6g.xlarge r6g.2xlarge r6g.4xlarge r6g.8xlarge r6g.12xlarge r6g.16xlarge r6gd.medium r6gd.large r6gd.xlarge r6gd.2xlarge r6gd.4xlarge r6gd.8xlarge r6gd.12xlarge r6gd.16xlarge t1.micro t2.nano t2.micro t2.small t2.medium t2.large t2.xlarge t2.2xlarge t3.nano t3.micro t3.small t3.medium t3.large t3.xlarge t3.2xlarge t3a.nano t3a.micro t3a.small t3a.medium t3a.large t3a.xlarge t3a.2xlarge x1.16xlarge x1.32xlarge x1e.16xlarge x1e.2xlarge x1e.32xlarge x1e.4xlarge x1e.8xlarge x1e.xlarge us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 eu-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ap-southeast-2 sa-east-1 ap-south-1 af-south-1 me-south-1 1 year 3 years While the chart above is a good start, there’s more than simply considering “Reserved vs. On Demand”. So let’s take a closer look at all the options… Terms and Payment OptionsEC2 Reserved Pricing gives you the option to purchase compute capacity in 1 year and 3 year terms. Also, you have the following payment options:
The more money you pay upfront, the greater the savings. Here’s a comparison showing all payment options (don’t forget to try different instance types, regions and to hover on the chart for more details): c1.medium c1.xlarge c3.2xlarge c3.4xlarge c3.8xlarge c3.large c3.xlarge c4.2xlarge c4.4xlarge c4.8xlarge c4.large c4.xlarge c5.large c5.xlarge c5.2xlarge c5.4xlarge c5.9xlarge c5.12xlarge c5.18xlarge c5.24xlarge c5d.large c5d.xlarge c5d.2xlarge c5d.4xlarge c5d.9xlarge c5d.12xlarge c5d.18xlarge c5d.24xlarge c6g.medium c6g.large c6g.xlarge c6g.2xlarge c6g.4xlarge c6g.8xlarge c6g.12xlarge c6g.16xlarge c6gd.medium c6gd.large c6gd.xlarge c6gd.2xlarge c6gd.4xlarge c6gd.8xlarge c6gd.12xlarge c6gd.16xlarge cc2.8xlarge cg1.4xlarge cr1.8xlarge d2.2xlarge d2.4xlarge d2.8xlarge d2.xlarge f1.16xlarge f1.2xlarge g2.2xlarge g2.8xlarge g3.16xlarge g3.4xlarge g3.8xlarge h1.16xlarge h1.2xlarge h1.4xlarge h1.8xlarge hs1.8xlarge i2.2xlarge i2.4xlarge i2.8xlarge i2.xlarge i3.16xlarge i3.2xlarge i3.4xlarge i3.8xlarge i3.large i3.xlarge m1.large m1.medium m1.small m1.xlarge m2.2xlarge m2.4xlarge m2.xlarge m3.2xlarge m3.large m3.medium m3.xlarge m4.10xlarge m4.16xlarge m4.2xlarge m4.4xlarge m4.large m4.xlarge m5.large m5.xlarge m5.2xlarge m5.4xlarge m5.8xlarge m5.12xlarge m5.16xlarge m5.24xlarge m5d.large m5d.xlarge m5d.2xlarge m5d.4xlarge m5d.8xlarge m5d.12xlarge m5d.16xlarge m5d.24xlarge m6g.medium m6g.large m6g.xlarge m6g.2xlarge m6g.4xlarge m6g.8xlarge m6g.12xlarge m6g.16xlarge m6gd.medium m6gd.large m6gd.xlarge m6gd.2xlarge m6gd.4xlarge m6gd.8xlarge m6gd.12xlarge m6gd.16xlarge p2.16xlarge p2.8xlarge p2.xlarge p3.16xlarge p3.2xlarge p3.8xlarge r3.2xlarge r3.4xlarge r3.8xlarge r3.large r3.xlarge r4.16xlarge r4.2xlarge r4.4xlarge r4.8xlarge r4.large r4.xlarge r5.large r5.xlarge r5.2xlarge r5.4xlarge r5.8xlarge r5.12xlarge r5.16xlarge r5.24xlarge r5d.large r5d.xlarge r5d.2xlarge r5d.4xlarge r5d.8xlarge r5d.12xlarge r5d.16xlarge r5d.24xlarge r5a.large r5a.xlarge r5a.2xlarge r5a.4xlarge r5a.12xlarge r5a.24xlarge r6g.medium r6g.large r6g.xlarge r6g.2xlarge r6g.4xlarge r6g.8xlarge r6g.12xlarge r6g.16xlarge r6gd.medium r6gd.large r6gd.xlarge r6gd.2xlarge r6gd.4xlarge r6gd.8xlarge r6gd.12xlarge r6gd.16xlarge t1.micro t2.nano t2.micro t2.small t2.medium t2.large t2.xlarge t2.2xlarge t3.nano t3.micro t3.small t3.medium t3.large t3.xlarge t3.2xlarge t3a.nano t3a.micro t3a.small t3a.medium t3a.large t3a.xlarge t3a.2xlarge x1.16xlarge x1.32xlarge x1e.16xlarge x1e.2xlarge x1e.32xlarge x1e.4xlarge x1e.8xlarge x1e.xlarge us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 eu-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ap-southeast-2 sa-east-1 ap-south-1 af-south-1 me-south-1 1 year 3 years You might have noticed that in many cases there’s no significant difference between All Upfront, Partial Upfront and No Upfront - only a few percentage points. TIP: Before committing to paying hundreds - or even thousands - of dollars upfront, take a look at the No Upfront option (my preferred alternative in many cases). No Upfront gives you almost the same amount of savings, without having to break the bank at the beginning of your Reserved period. ScopeBefore choosing a Reserved option, it’s also important to understand the Scope of your reservations:
For example, if you buy one m5.xlarge running Amazon Linux with Regional scope, you can actually launch 2 m5.large instances running Amazon Linux and get the Reserved discount applied to both instances. You can launch them in any Availability Zone within the same region and save money. If you buy that same m5.xlarge reservation with Availability Zone scope in us-east-1a, you won’t be able to apply the same Reserved discount to 2 m5.large instances - only to 1 m5.xlarge launched in us-east-1a. If for some reason you need to launch an m5.xlarge in us-east-1b, you won’t get a discount. You will, however, get a higher degree of confidence that you can launch a new m5.xlarge in us-east-1a in case EC2 is running low on compute capacity in that particular Availability Zone. If this sounds a bit confusing to you, don’t worry, you’re not the only one. To summarize, Scope comes down to prioritizing flexibility (Regional) over guaranteed capacity (AZ). There’s no cost difference between the two. TIP: Unless you have very specific and critical capacity requirements, I’d recommend choosing Regional scope. Instance size flexibility is a great feature that you lose if you choose the Availability Zone scope. It’s also easier to save money by choosing Regional. Offering ClassesThere are two Offering Classes:
Offering Classes basically help you to manage risk. With Convertible you mitigate some of the risk associated with potentially not choosing the right instance family, while Standard doesn’t give you that flexibility. Of course, lower risk results in less savings. Standard is cheaper than Convertible. Also, you can only sell Reserved capacity in the Reserved Instance Marketplace if you’ve bought Standard (more on that below). Here is a price comparison between Standard and Convertible for the All Upfront option (you can choose a different instance type and region and hover on the chart to see more details). As you can see, price differences between Standard and Convertible can start at about 10% or even higher, depending on the instance type, region and number of years. c1.medium c1.xlarge c3.2xlarge c3.4xlarge c3.8xlarge c3.large c3.xlarge c4.2xlarge c4.4xlarge c4.8xlarge c4.large c4.xlarge c5.large c5.xlarge c5.2xlarge c5.4xlarge c5.9xlarge c5.12xlarge c5.18xlarge c5.24xlarge c5d.large c5d.xlarge c5d.2xlarge c5d.4xlarge c5d.9xlarge c5d.12xlarge c5d.18xlarge c5d.24xlarge c6g.medium c6g.large c6g.xlarge c6g.2xlarge c6g.4xlarge c6g.8xlarge c6g.12xlarge c6g.16xlarge c6gd.medium c6gd.large c6gd.xlarge c6gd.2xlarge c6gd.4xlarge c6gd.8xlarge c6gd.12xlarge c6gd.16xlarge cc2.8xlarge cg1.4xlarge cr1.8xlarge d2.2xlarge d2.4xlarge d2.8xlarge d2.xlarge f1.16xlarge f1.2xlarge g2.2xlarge g2.8xlarge g3.16xlarge g3.4xlarge g3.8xlarge h1.16xlarge h1.2xlarge h1.4xlarge h1.8xlarge hs1.8xlarge i2.2xlarge i2.4xlarge i2.8xlarge i2.xlarge i3.16xlarge i3.2xlarge i3.4xlarge i3.8xlarge i3.large i3.xlarge m1.large m1.medium m1.small m1.xlarge m2.2xlarge m2.4xlarge m2.xlarge m3.2xlarge m3.large m3.medium m3.xlarge m4.10xlarge m4.16xlarge m4.2xlarge m4.4xlarge m4.large m4.xlarge m5.large m5.xlarge m5.2xlarge m5.4xlarge m5.8xlarge m5.12xlarge m5.16xlarge m5.24xlarge m5d.large m5d.xlarge m5d.2xlarge m5d.4xlarge m5d.8xlarge m5d.12xlarge m5d.16xlarge m5d.24xlarge m6g.medium m6g.large m6g.xlarge m6g.2xlarge m6g.4xlarge m6g.8xlarge m6g.12xlarge m6g.16xlarge m6gd.medium m6gd.large m6gd.xlarge m6gd.2xlarge m6gd.4xlarge m6gd.8xlarge m6gd.12xlarge m6gd.16xlarge p2.16xlarge p2.8xlarge p2.xlarge p3.16xlarge p3.2xlarge p3.8xlarge r3.2xlarge r3.4xlarge r3.8xlarge r3.large r3.xlarge r4.16xlarge r4.2xlarge r4.4xlarge r4.8xlarge r4.large r4.xlarge r5.large r5.xlarge r5.2xlarge r5.4xlarge r5.8xlarge r5.12xlarge r5.16xlarge r5.24xlarge r5d.large r5d.xlarge r5d.2xlarge r5d.4xlarge r5d.8xlarge r5d.12xlarge r5d.16xlarge r5d.24xlarge r5a.large r5a.xlarge r5a.2xlarge r5a.4xlarge r5a.12xlarge r5a.24xlarge r6g.medium r6g.large r6g.xlarge r6g.2xlarge r6g.4xlarge r6g.8xlarge r6g.12xlarge r6g.16xlarge r6gd.medium r6gd.large r6gd.xlarge r6gd.2xlarge r6gd.4xlarge r6gd.8xlarge r6gd.12xlarge r6gd.16xlarge t1.micro t2.nano t2.micro t2.small t2.medium t2.large t2.xlarge t2.2xlarge t3.nano t3.micro t3.small t3.medium t3.large t3.xlarge t3.2xlarge t3a.nano t3a.micro t3a.small t3a.medium t3a.large t3a.xlarge t3a.2xlarge x1.16xlarge x1.32xlarge x1e.16xlarge x1e.2xlarge x1e.32xlarge x1e.4xlarge x1e.8xlarge x1e.xlarge us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 eu-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ap-southeast-2 sa-east-1 ap-south-1 af-south-1 me-south-1 1 year 3 years Don’t forget about choosing the right AWS RegionIf you haven’t deployed your components in a particular AWS region yet and you have some flexibility, it’s always important to choose your AWS region wisely. When it comes to EC2 Reserved Instances, you can expect different savings according to the region you choose. Take a look at the following graph that calculates total cost for Reserved Standard All Upfront (Linux) vs. On Demand. As you can see, there are different savings (both in dollar amount and percentage) depending on the region you choose (hover on the chart to see On Demand cost and savings): c1.medium c1.xlarge c3.2xlarge c3.4xlarge c3.8xlarge c3.large c3.xlarge c4.2xlarge c4.4xlarge c4.8xlarge c4.large c4.xlarge c5.large c5.xlarge c5.2xlarge c5.4xlarge c5.9xlarge c5.12xlarge c5.18xlarge c5.24xlarge c5d.large c5d.xlarge c5d.2xlarge c5d.4xlarge c5d.9xlarge c5d.12xlarge c5d.18xlarge c5d.24xlarge c6g.medium c6g.large c6g.xlarge c6g.2xlarge c6g.4xlarge c6g.8xlarge c6g.12xlarge c6g.16xlarge c6gd.medium c6gd.large c6gd.xlarge c6gd.2xlarge c6gd.4xlarge c6gd.8xlarge c6gd.12xlarge c6gd.16xlarge cc2.8xlarge cg1.4xlarge cr1.8xlarge d2.2xlarge d2.4xlarge d2.8xlarge d2.xlarge f1.16xlarge f1.2xlarge g2.2xlarge g2.8xlarge g3.16xlarge g3.4xlarge g3.8xlarge h1.16xlarge h1.2xlarge h1.4xlarge h1.8xlarge hs1.8xlarge i2.2xlarge i2.4xlarge i2.8xlarge i2.xlarge i3.16xlarge i3.2xlarge i3.4xlarge i3.8xlarge i3.large i3.xlarge m1.large m1.medium m1.small m1.xlarge m2.2xlarge m2.4xlarge m2.xlarge m3.2xlarge m3.large m3.medium m3.xlarge m4.10xlarge m4.16xlarge m4.2xlarge m4.4xlarge m4.large m4.xlarge m5.large m5.xlarge m5.2xlarge m5.4xlarge m5.8xlarge m5.12xlarge m5.16xlarge m5.24xlarge m5d.large m5d.xlarge m5d.2xlarge m5d.4xlarge m5d.8xlarge m5d.12xlarge m5d.16xlarge m5d.24xlarge m6g.medium m6g.large m6g.xlarge m6g.2xlarge m6g.4xlarge m6g.8xlarge m6g.12xlarge m6g.16xlarge m6gd.medium m6gd.large m6gd.xlarge m6gd.2xlarge m6gd.4xlarge m6gd.8xlarge m6gd.12xlarge m6gd.16xlarge p2.16xlarge p2.8xlarge p2.xlarge p3.16xlarge p3.2xlarge p3.8xlarge r3.2xlarge r3.4xlarge r3.8xlarge r3.large r3.xlarge r4.16xlarge r4.2xlarge r4.4xlarge r4.8xlarge r4.large r4.xlarge r5.large r5.xlarge r5.2xlarge r5.4xlarge r5.8xlarge r5.12xlarge r5.16xlarge r5.24xlarge r5d.large r5d.xlarge r5d.2xlarge r5d.4xlarge r5d.8xlarge r5d.12xlarge r5d.16xlarge r5d.24xlarge r5a.large r5a.xlarge r5a.2xlarge r5a.4xlarge r5a.12xlarge r5a.24xlarge r6g.medium r6g.large r6g.xlarge r6g.2xlarge r6g.4xlarge r6g.8xlarge r6g.12xlarge r6g.16xlarge r6gd.medium r6gd.large r6gd.xlarge r6gd.2xlarge r6gd.4xlarge r6gd.8xlarge r6gd.12xlarge r6gd.16xlarge t1.micro t2.nano t2.micro t2.small t2.medium t2.large t2.xlarge t2.2xlarge t3.nano t3.micro t3.small t3.medium t3.large t3.xlarge t3.2xlarge t3a.nano t3a.micro t3a.small t3a.medium t3a.large t3a.xlarge t3a.2xlarge x1.16xlarge x1.32xlarge x1e.16xlarge x1e.2xlarge x1e.32xlarge x1e.4xlarge x1e.8xlarge x1e.xlarge 1 year 3 years What are the risks of Reserved Pricing?In the best-case scenario, you’ll save a lot of money. But there are trade-offs that you have to be aware of before you go the Reserved route. Here are some important cost/benefit considerations I always think about: Cash FlowIf you’re an application owner, you also have to consider how your applications relate to your business. While it’s very appealing to save up to 75% on your EC2 bill, making a Reserved purchase can potentially result in thousands of dollars spent upfront. This is money you could spend on hiring, advertising, product development or other areas that could be equally, or even more beneficial to your business. On the other hand, you might be in a situation where a large expenditure could be a positive thing due to accounting or tax reasons. Therefore, before making a large Reserved purchase, consider doing some business number crunching or having a conversation with your accountant or CFO. Tip: If you don’t want to spend a lot of money upfront, go with either the Partial Upfront or the No Upfront option. You can still get some solid savings while avoiding a steep upfront fee. RisksHere are some examples of common risks associated with EC2 Reserved: Inaccurate Provisioning When you’re paying for your EC2 instances using On Demand pricing (the default), you can always change the instance type and compute capacity for your applications. If something changes in your business and you realize you don’t need as much EC2 capacity, you can just shut down a few EC2 instances, or provision a smaller EC2 instance and lower your AWS bill. With Reserved, you lose that flexibility. Tip: Before purchasing Reserved instances, monitor system metrics in Production. Once you’re confident a particular instance type is right for your workload, then consider purchasing Reserved. Then go with Regional scope and gradually increase purchased capacity. Better (and cheaper) generations of EC2 Instance Types If you follow EC2 announcements, you’ll notice that new instance types are released quite often. So what happens if a new, better EC2 instance is released while you’re committed to a 1-year or 3-year Reserved purchase? You could miss out on better features or important cost savings - or both. For example, a c5.large instance is 15% cheaper compared to the previous generation. An m4.large is 23% cheaper compared to the previous generation, an m3.large.
Besides cost, there’s also the possibility of AWS releasing better versions of a particular instance type. Take the c5 family, which was announced in November 2017. Six months later, the c5d was announced, offering better performance for disk-intensive workloads. Then in November 2018 came the c5n, which offers better network performance than c5 instance types. As you can see, there’s always the possibility of AWS releasing improved versions of a particular instance type, which is something to keep in mind before committing to a 3-year Reserved term. Tip: Before committing to a 3-year Reserved term, take a look at when that particular instance type was announced. If it’s been more than a couple of years, it might make more sense to go with a 1-year reservation instead Tip: If you discover you don’t need a specific Reserved capacity anymore (i.e. you bought more than you need or bought a sub-optimal type for your workload), you can always sell excess Reserved capacity in the Reserved Instance Marketplace. Keep in mind this only applies to the Standard offering class and if you have a bank account based in the US. Important MetricsHere are some relevant numbers to calculate, before committing to a Reserved purchase: Savings vs. On Demand Before making a decision, always keep track of both the dollar and percentage amount saved by purchasing Reserved compared to On Demand. Savings vs. On Demand have to be calculated over the whole term of the Reserved purchase, which could be 1 year or 3 years. Upfront Fee and Savings Reserved purchases have different degrees of upfront payment. While you can pay everything upfront (and get the most savings), you could also pay a partial upfront fee or no upfront fee at all. The more money you pay upfront, the higher the savings. Therefore, it’s very important to calculate both. Months to Recover A critical metric to evaluate is Months to Recover. This tells you how much time you have to wait before you start to see some savings compared to On Demand pricing. You’ll see that in some cases, it’s almost a full year before you start to see some savings (sometimes more). This number varies not only based on the Payment Option, but also on the EC2 instance type and in some cases on the AWS region. Comparing All OptionsLet’s take a look at all of the options in a single chart. Here you’ll see how Standard vs. Convertible compare against each other and also different Purchase Options and terms (1 year vs. 3 years). The chart displays how cost accumulates throughout your commitment period and it shows Months to Recover (MtR) as vertical annotations. Don’t forget to hover over the chart to see more pricing details. c1.medium c1.xlarge c3.2xlarge c3.4xlarge c3.8xlarge c3.large c3.xlarge c4.2xlarge c4.4xlarge c4.8xlarge c4.large c4.xlarge c5.large c5.xlarge c5.2xlarge c5.4xlarge c5.9xlarge c5.12xlarge c5.18xlarge c5.24xlarge c5d.large c5d.xlarge c5d.2xlarge c5d.4xlarge c5d.9xlarge c5d.12xlarge c5d.18xlarge c5d.24xlarge c6g.medium c6g.large c6g.xlarge c6g.2xlarge c6g.4xlarge c6g.8xlarge c6g.12xlarge c6g.16xlarge c6gd.medium c6gd.large c6gd.xlarge c6gd.2xlarge c6gd.4xlarge c6gd.8xlarge c6gd.12xlarge c6gd.16xlarge cc2.8xlarge cg1.4xlarge cr1.8xlarge d2.2xlarge d2.4xlarge d2.8xlarge d2.xlarge f1.16xlarge f1.2xlarge g2.2xlarge g2.8xlarge g3.16xlarge g3.4xlarge g3.8xlarge h1.16xlarge h1.2xlarge h1.4xlarge h1.8xlarge hs1.8xlarge i2.2xlarge i2.4xlarge i2.8xlarge i2.xlarge i3.16xlarge i3.2xlarge i3.4xlarge i3.8xlarge i3.large i3.xlarge m1.large m1.medium m1.small m1.xlarge m2.2xlarge m2.4xlarge m2.xlarge m3.2xlarge m3.large m3.medium m3.xlarge m4.10xlarge m4.16xlarge m4.2xlarge m4.4xlarge m4.large m4.xlarge m5.large m5.xlarge m5.2xlarge m5.4xlarge m5.8xlarge m5.12xlarge m5.16xlarge m5.24xlarge m5d.large m5d.xlarge m5d.2xlarge m5d.4xlarge m5d.8xlarge m5d.12xlarge m5d.16xlarge m5d.24xlarge m6g.medium m6g.large m6g.xlarge m6g.2xlarge m6g.4xlarge m6g.8xlarge m6g.12xlarge m6g.16xlarge m6gd.medium m6gd.large m6gd.xlarge m6gd.2xlarge m6gd.4xlarge m6gd.8xlarge m6gd.12xlarge m6gd.16xlarge p2.16xlarge p2.8xlarge p2.xlarge p3.16xlarge p3.2xlarge p3.8xlarge r3.2xlarge r3.4xlarge r3.8xlarge r3.large r3.xlarge r4.16xlarge r4.2xlarge r4.4xlarge r4.8xlarge r4.large r4.xlarge r5.large r5.xlarge r5.2xlarge r5.4xlarge r5.8xlarge r5.12xlarge r5.16xlarge r5.24xlarge r5d.large r5d.xlarge r5d.2xlarge r5d.4xlarge r5d.8xlarge r5d.12xlarge r5d.16xlarge r5d.24xlarge r5a.large r5a.xlarge r5a.2xlarge r5a.4xlarge r5a.12xlarge r5a.24xlarge r6g.medium r6g.large r6g.xlarge r6g.2xlarge r6g.4xlarge r6g.8xlarge r6g.12xlarge r6g.16xlarge r6gd.medium r6gd.large r6gd.xlarge r6gd.2xlarge r6gd.4xlarge r6gd.8xlarge r6gd.12xlarge r6gd.16xlarge t1.micro t2.nano t2.micro t2.small t2.medium t2.large t2.xlarge t2.2xlarge t3.nano t3.micro t3.small t3.medium t3.large t3.xlarge t3.2xlarge t3a.nano t3a.micro t3a.small t3a.medium t3a.large t3a.xlarge t3a.2xlarge x1.16xlarge x1.32xlarge x1e.16xlarge x1e.2xlarge x1e.32xlarge x1e.4xlarge x1e.8xlarge x1e.xlarge us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 eu-south-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ap-southeast-2 sa-east-1 ap-south-1 af-south-1 me-south-1 1 year 3 years Now that we’ve been through the main details regarding EC2 Reserved, I highly recommend having a repeatable, step-by-step process. 1. Gather All Relevant DataThis is the most important part of the whole process. Without data, you can’t possibly make a good decision - especially on something that has so many variables, such as committing long term to an EC2 instance type and a term that is right for your application and business. Analyze Billing Data Configure AWS Cost and Usage Reports and be ready to analyze them using tools such as Athena or QuickSight. You can use AWS Cost Explorer as well, but in my experience, if you need more detailed information it’s a good investment to analyze Cost and Usage Reports. Find the top 10 Usage Types by cost in your AWS bill. Calculate the percentage they represent of your total bill.
Gather and Analyze System Metrics
Make sure you’ve analyzed the following metrics:
Find the dimensions your applications are particularly heavy on and also the areas that aren’t that important. For example, maybe your application doesn’t need a lot of network throughput, or your application requires large amounts of memory.
2. Apply Performance OptimizationsConfigure Auto Scaling (Usage-based, Scheduled Actions, Dynamic Scaling or Predictive Scaling) EC2 Auto Scaling is an essential part of any application that runs on EC2. Even though there are cases where a single EC2 instance for a particular task is appropriate, in most situations it makes sense to configure a fleet of EC2 instances managed by Auto Scaling. This will increase performance and availability as well as reduce cost. It’s also important to have Auto Scaling configured before calculating your Baseline Capacity (we’ll get to that later)
Optimize and Test Once you’ve gathered data and configured Auto Scaling, the next natural step is to actually update the EC2 instance types in your application.
“Let it soak” in Production If your load tests brought the desired result, then it’s time to promote your changes to Production. In this case I recommend:
3. Calculate the right amount of EC2 Reserved instances and TermsYou can only arrive at this step once you’re confident your application is running on the right number, size and family of EC2 instances. It might take some iterations of performance optimizations to get here, but it’s important you’ve chosen the right EC2 instance type before purchasing reserved capacity. Become familiar with EC2 Normalization Factors If you’re buying Reserved Instances running Linux/Unix, using Regional scope and default tenancy, then your RIs are eligible for instance size flexibility. In this case, EC2 Normalization factors become relevant. A Normalization Factor assigns a specific weight to a particular instance size and allows you to compare EC2 instance sizes against each other in a standard way. For example, an m5.2xlarge is 4 times the size of an m5.large, or a t2.medium is twice the size of a t2.small. This relative size is also applied to billing. You can find more information on normalization factors in the AWS documentation. The recommendation is to buy reservations for an applicable EC2 instance with the smallest normalization factor. For example, if you conclude that you need 1 m5.xlarge, then buy 2 m5.large reservations (assuming your scenario supports instance size flexibility). Calculate Baseline EC2 Instance Hours per Month If you’re using EC2 Auto Scaling, you’ll have some variation in the number of EC2 instances that power your applications. There will be spikes in usage, but there are also Baseline EC2 Instance Hours per Month, which is the minimum stable amount of compute hours you’ll need to pay for each month. This number will determine the amount of Reserved instances that will result in AWS cost savings. Something like the illustration below: Getting this number right will maximize your EC2 cost savings. The following steps will help you get there:
Find the Right Options and execute the purchase Now that you’re sure about the EC2 instance type and size you’ll need and you’ve calculated the number of EC2 Reserved instances that will save you money, it’s time to choose between the different options:
If your scenario supports instance size flexibility, don’t forget to buy reservations with the smallest applicable EC2 Normalization Factor (e.g. 2 c5.large instead of 1 c5.xlarge). To take a look at the comparison charts again, click here. Remember, it comes down to choosing the right balance between savings, flexibility and risk. I prefer to start small and then gradually purchase more reserved capacity, to make sure I don’t overcommit. 4. Rinse and RepeatAfter you purchase Reserved EC2 instances, you’ll have to take a look at your billing data and system data and repeat the previous steps until you get to a point where baseline compute usage is covered by Reserved instances. If you discover that you bought more capacity than you need, or a sub-optimal type, you can always consider selling some of your existing capacity in the Reserved Instance Marketplace to recover some of your investment. To SummarizeThis diagram summarizes the steps described in this article: Do you need help lowering your AWS cost?Want to make sure you’re not overspending on your AWS bill? Feel like you’re spending more than you should on AWS, but don’t know how to fix it or simply don’t have time? I can save you a lot of money. Just click on the button below to schedule a consultation or use the contact form. |