ELI5: AWS EC2 Savings Plans

I’ve been purchasing RIs for years, and recently had to renew an RI that contained 4x T2.micros.

So I decided to ‘upgrade’ to the newer (and cheaper) t3a family, and purchased an RI for 4x t3a.micros. Unfortunately, I hit some performance issues and had to do all sorts of hacky things to keep my production environment running, but even then the experience for my users was less than ideal.

Since it had only been a month into my RI, I decided to reach out to AWS Support and see if I could change my RI to larger instances to handle my loads. They responded with an option to purchase an EC2 Savings Plan for the same amount I had spent for the RI, then refund me for the RI.

Ive’ tried to wrap my head around how Savings Plans work, but I still have some questions:

The Savings Plan I purchased was for 3yrs upfront, Instance Family: t3a, *Hourly commitment*: $0.014 minimum. The total was $367.92, which is about what i paid for the original RI ($372 upfront)

  1. If I launch 4x t3a.micros, then the Savings Plan would apply to all 4 of the instances, and I would see no overage charges, correct?
  2. What happens if I launch a single t3a.small and 2x t3a.micros? Would my Savings Plan still cover all instances without overages?
  3. Now let’s say I launch a t3a.medium, plus a t3a.micro. From my understanding of SPs, I am now ‘over’ my Savings Plan allowance by the equivalent of 1x t3a.micro. How does this overage get charged to me? Does it use my ‘balance’ from the SP, or do I get charged On-Demand rates?
  4. Assuming I get charged On-Demand, let’s say I like the above setup for my needs. Can I purchase another SP for the equivalent of a t3a.micro, and then would the extra instance be covered by this add’l SP?

Essentially what Savings Plans do is commit you to a total hourly rate, but if you can adjust the specifics (e.g. instance size or even type depending on which Savings Plan you’re on). You’re billed at least that amount hourly, and any overage is at the on-demand pricing.

Because you mentioned that you had to commit to an instance family, I assume these are the “EC2 Instance Savings Plan” and not the “Compute Savings Plan for EC2” (which gives you slightly less of a discount but lets you change instance families).

Assuming the above to be true,

If I launch 4x t3a.micros, then the Savings Plan would apply to all 4 of the instances, and I would see no overage charges, correct?

Yes. The math on what you paid works out to 4x t3a.micro instances for 3 years, all-upfront.

What happens if I launch a single t3a.small and 2x t3a.micros? Would my Savings Plan still cover all instances without overages?

Allllllmost. There’s a very small difference in price due to either rounding or a slightly reduced discount on the small instance. 2 micros are $0.0070/hr and the small is $0.0071/hr at the Savings Plan rate. There’s a $0.0001/hr difference between those instances and what you’ve paid that would probably have to be reconciled, but the difference is pennies a month. I believe the instance billing gets fractionated and you’d end up paying about 1.4% of the on-demand price of a t3a.

Now let’s say I launch a t3a.medium, plus a t3a.micro. From my understanding of SPs, I am now ‘over’ my Savings Plan allowance by the equivalent of 1x t3a.micro. How does this overage get charged to me? Does it use my ‘balance’ from the SP, or do I get charged On-Demand rates?

This is basically the same as above except with significant numbers. Your SP gets used up first, then you pay on-demand for the overage.

Assuming I get charged On-Demand, let’s say I like the above setup for my needs. Can I purchase another SP for the equivalent of a t3a.micro, and then would the extra instance be covered by this add’l SP?

Yes, you can have as many SPs as you want. All SPs are used first before going to on-demand pricing.

I would caution against going way overboard with this though and try to consolidate as much as possible. :slight_smile:

Oh wow, thanks for such a great and easy to understand answer! AWS support was running around in circles with me on these questions. Right now, I’ve got a single t3a.small, and 2x t3a.micros, so the SP should basically cover it outside of a few cents extra/month. I’m ok with that!

SPs seem like the way to go, over RIs, due to more flexibility for essentially the same savings over OD.

Thanks again!

Yeah, TBH I found Savings Plans to be pretty hard to wrap my head around at first. There was something about pre-paying at a discounted rate when the actual usage doesn’t exactly line up with what I was prepaying for that was slightly mind-warping. But overall they’re MUCH simpler on the administrative side than RIs, and MUCH more flexible. EC2 RIs are dead to me now. :stuck_out_tongue:

The way that I was able to kinda get a grasp on how it worked was by utilizing a mix Cost Explorer, a kb article from Amazon on normalization units, and some simple (yet painful) math. I’ll agree it took quite awhile to understand it all, but once you can wrap your head around it, it makes so much sense.

That’s just for me and the instance savings plans though. Compute I didnt even touch. I assume they’re fairly similar and like someone above mentioned, you can switch classes.

I think the normalization units only applies to the EC2 Savings Plan thing because it only works within a single instance family. It’s basically the same way that RDS reserved instances work – you can buy a 4xlarge RI but deploy 8 large instances of the same family, for example.

The Compute SPs are a little bit more complicated but have a similar learning curve. Took a bit of a mental shift in my mental “base unit of measure” before it clicked for me. With RIs (and EC2 SPs, I believe), you’re basically doing the math of “how many instances of each family do I need?” whereas with Compute SPs it’s more “what is the total cost at the discounted rate to provision the capacity I need?”.

Given that you had issue switching from t2 to t3a, you should look at Compute Savings Plans which will let you come back to t2 if you like (or fargate).

Did you found why a t3a has performance issues ? I had the same problem with rds-postgresql and came back to t2 but didn’t investigate more.

that said, why the price of Compute Saving Plan is different by region when it cover usage in all regions ? For example t3.nano is 0,0045 USD in Paris, 0,0041 USD in Stockholm

Two of the t3a micros were being used for image resizing. While the jobs can be heavy at times, I never really had an issue with the t2’s in this role. They might take longer, but would eventually chug through the workload. But with the t3a’s, they were constantly hitting OOM errors. When they did that, the servers would effectively lock up and never recover without a reboot. I’d resorted to enabling detailed monitoring on both instances to then launch a t3a.medium to help out. Obviously the time to monitor for the issues, then scale in/out was less than ideal. Not to mention adding Cloudwatch monitoring to my monthly charges. After some fiddling, I was able to determine that I could combine the other two servers into one without any performance issues, and combined the two image processing instances into a single t3a.small, which seems to be handling the jobs much better so far. And now I can enable Cloudwatch on that one instance instead of two, so my CW charges are less as well. If I run into issues again with this setup, at least I can bump up the size again and purchase an add’l SP to cover the overage charges. TLDR; I should have tested the t3a’s longer before purchasing the RIs!

But with the t3a’s, they were constantly hitting OOM errors.

Did you ever add a swap file?

I am using a t3a.micro (1G mem) and it will sometimes run out of memory when compiling Go programs. I added a 1G swap file and now do not have any OOM issues. Of course, it is slower, but swapping to SSD isn’t too bad for me since I am just using this for personal projects.

Normalisation units are the same for RI & SP and work the same with any purchase option that’s listed as instance-size flexible. All EC2 RI purchases except the AZ Specific which give capacity reservation are size flexible, but IIRC Elasticsearch RIs are not.

The price of Savings Plans aren’t different by region. The recommended commitment depends on your usage, so if you choose to use Paris (from your example) then the recommendation will be higher.

If i take a saving plan with the Stockholm price and i finally use an instance in Paris my saving plan will not completely cover this instance, i will have on demand price for the difference. Yes ?

Yep, exactly.

I learned something today ! thanks

:slight_smile: Also worth noting that if you have lots of these and it generates significant costs, you could buy another SP to cover that!!

I think I’m still struggling to understand the difference between the EC2 Instance Savings Plan vs RI. From a flexibility perspective, they’re very similar to convertible RI right but priced to the standard RI?

The automation of the flexibility stands out to me as the big change. Is there something else that makes EC2 Instance Savings Plans way more flexible than what we could do today with a convertible RI?

I’ll say that I’m not super familiar with the intricacies of EC2 Instance Savings Plans, because the few extra percent savings weren’t worth it for us compared to the ultimate flexibility offered by Compute Savings Plans.

I think that the EC2 Instance plans are similar to convertible RIs, but without having to do the hassle of formally exchanging the RIs and doing the square-up process.

The Compute SPs are IMHO better because you’re not even tied to a particular region. If you need to move regions, you can, without doing anything other than moving your instances.

I honestly don’t even know why they bothered making the EC2 Instance savings plans at all rather than just making it much much simpler with the Compute plans. I guess maybe the 1-2% difference in instance cost matters to some companies? It seems like it’s needlessly complex to me. *shrug*