AWS recommends 54 t2.nano EC2 instances instead of one m5.xlarge

Solution 1:

There's a couple of things to understand:

  1. Reserved Instances are just a billing construct. AWS will try to match the purchased reserved instances against your running instances at the billing time. I.e. you don’t assign RIs to your actual EC2 instances, you get the discount automatically.

  2. Reserved Instances capacity doesn’t have to match the running instances. The price for t2.medium is the same as for 2x t2.small or 8x t2.nano. So if you purchase 32x t2.nano it would fully cover the price of 1x t2.xlarge. From the billing perspective it’s the same.

    On the other hand t2.anything won't be applied against m5.anything - they are a different instance class. You can buy 2x m5.large instead of 1x m5.xlarge reserved instance - same thing from a billing perspective.

  3. Now why does it recommend 54x t2.nano? Probably it found out that your actual needs are somewhere between t2.xlarge and t2.2xlarge - and it's best expressed as 54x t2.nano.

    Depending on your application you may or may not be able to spread the load over a number of smaller instances. I wouldn't go to 54x t2.nano but perhaps 3x t2.large could be a good option? You can then set up auto-scaling to remove some of the nodes during quiet times and save. And even use Spot Instances and save even more. However for both ASG and Spot you'll need some automation in place.

  4. For a much greater flexibility look at AWS Saving Plans - with that you'll be able to migrate your application to newer instance types, mix and match instance types, etc. With Reserved Instances you're locked to a particular instance class in a particular region. With Saving Plans you only commit to a certain spend per month and it's up to you how you use it.

Hope that helps :)

Solution 2:

The general idea behind this is instead of provisioning one large server for peak load, you have a larger number of smaller servers that scale up and down automatically to meet load. You put your servers behind an application load balancer. This also gives you redundancy, in case something goes wrong with one server.

54 t2.nano is an odd recommendation. Maybe it's optimal but it's not intuitive. It also means each server has very little RAM, which might not work for the application. t instances can also run out of CPU credits, so I wouldn't use them behind a load balancer. If you turn on the option on T instance to buy extra credits it costs more than using a non-T instance.

The m5.xlarge isn't a particularly large server, so it's more difficult to split it up. I would stay with m series, the smaller is m5.large so you would probably scale between 1 and 3 of them.

If it's a fairly steady state application and the cost isn't a problem the easiest option is to stay with your m5.xlarge.