The Essential Guide to AWS Ec2 Instance Purchasing Options
On-Demand Instances
Here you will pay for what you use, that means, using Linux or Windows will result in you receiving a payment per second after the first minute, whereas using any other operating system would result in a billing per hour.
Although it costs more than any other, there are no up-front charges and no long-term commitments.
So, the on-demand instances are recommended in case you have a short-term and uninterrupted workload where you cannot predict how the application will behave.
The on-demand instance is good for Short workloads.
Reserved Instances
When compared to on-demand, the reserved instances offer you an approx 72%(can be changed) discount.
Additionally, you reserve particular instance properties, For example, the OS, the region, the tenancy, and the instance type.
To receive even greater discounts, you can pick a reserve duration of one or three years and You can also specify whether you want to pay in full upfront, in installments, or not at all, however, paying upfront provides you the biggest discounts.
Moreover, If you no longer require your reserved instances, you can purchase or sell them in a marketplace.
This is Good for long workloads, for example, if you are going to run a database for a long time then this is good for you.
convertible reserved instance
There is also a specific kind of reserved instance which is called the convertible reserved instance.
This enables you to modify the instance family, instance type, operating system, scope, and tenancy.
Here You receive up to 66% discounts, but because you have greater options, you receive a little bit less of a discount.
Savings Plans EC2
In the saving plans ec2 instance you will get a discount based on long-term usage of up to 72% similar to Reserved instances.
But, in addition, you need to commit to a certain type of usage like $10/hour for 1 or 3 years tenure and after that, the saving plan will be going to be billed at the on-demand price.
With the saving plan you are tied with a specific instance family and region, for example(M3 in US-east-I)
However, you have flexibility about instance size. You can thus choose between m5.xlarge, m5.2xlarge, and so forth. The OS allows you to switch between Windows and Linux, for example. You can choose between host, dedicated, and default tenancies, as well.
Spot Instances
The pot instances are designed for very short workloads and are incredibly cheap; but, because you can lose these instances at any time, they are less dependable.
It offers a larger discount—up to 90%—than on-demand, but because you specify a maximum price you're ready to pay for your spot instances, you could lose them at any time. Additionally, you will lose it if the spot price exceeds it.
They are therefore the most economical instances in AWS, and if you have a workload that is resilient to failure, they will be highly useful.
can be recommeeded for distributed task of any kind, a workload with a configurable start and finish time, batch jobs, data analysis, picture processing, etc.
However, They are not suitable for critical jobs or databases.
Dedicated host
You can reserve a complete physical server with a dedicated host, and you can manage where instances are placed, due to that it becomes the most expensive option from the list.
Furthermore, with dedicated instances, no other users will share your hardware.
There is also dedicated instace, so remember that dedicated instances mean that you have your own instance on your own hardware, whereas dedicated host, you get access to the physical server itself and it gives you visibility into the lower level hardware.