Aamir
In Amazon Web Services (AWS), there are several instance purchasing options available, and they are designed to accommodate different usage patterns and requirements.
1. On-Demand Instance
This is one of the most flexible option to launch an EC2 instance in AWS. You pay per second of compute capacity that you launch.
-> No commitment is needed from your side and you may decide to terminate your instance after 5 minutes and it’s absolutely fine.
-> You are in complete control of lifecycle for example when to launch , stop, hibernate, reboot or terminate it. You pay only for seconds when your instance is in running state.
-> It is well suited for short term or irregular workload which can not be interrupted.
-> You can use it for application development/testing.
2. Reserved Instance
Reserved Instances provides huge savings on your EC2 instances compared to on-demand up to 72%. All you need is to commit to a specific instance configuration, instance type and duration which can be either 1 or 3 years.
-> Well suited for consistent workload for example a database
-> In other words, you can use this option to reserve the compute capacity with a commitment of duration and config
-> Reservation period can be either 1 year or 3 year. Please not that it’s not 1-3 years , it’s either 1 or 3. No other option
-> You can use convertible reserved instances if you ever want to change instance type but discount will be less in that case
-> There is a limit on number of reserved running instances of 20 per Region. However, you can request a limit increase anytime if you need.
3. Savings Plan
This is a newer plan by AWS and it helps you reduce your EC2 cost if you make a commitment that you will use it for a specific duration that should either 1 or 3 years but the added advantage on top of reserved instance is that you are allowed to change instance configuration/types.
-> Savings plan provides significant cost saving as compared to on-demand at the same time is flexible enough to let you change configurations/instance types.
-> There is no limit on running instances
-> After AWS came up with Savings Plan, I don’t think there are needs to go with Reserved Instance. Savings plan is far more flexible
4. Spot Instance
Spot instances are one of the most cost effective options to launch an EC2 instance on AWS but your instance can be taken from you at any time.
-> Ideally you request unused EC2 instances and that’s the reason they are most cost effective and provides cost saving of 90% as compared to on-demand
-> You bid the price and get the instance when the bid price is under that
-> Your instances will be reclaimed from you as soon as bid price goes beyond the threshold with 2 minutes of notification
-> Instance can be taken back from you at any time
-> Suitable for workload that can handle interruption well by providing compute at cheapest price
-> Not suitable for critical workload or workload that can’t handle interruption.
5. Dedicated Hosts
A dedicated host is a real physical server that you can book. Which means it’s full EC2 capacity is for your use. No body else can launch an EC2 instance on that server.
-> Dedicated host allows you to use your existing server license(Bring your own licensee- BYOL)
-> Lets you meet your regulatory/compliance requirement
-> You have complete visibility and control over how instances are placed on the server.
6. Dedicated Instance
Dedicated instances provides you with dedicated hardware for your EC2 instances.
-> May share hardware with instances that are in your account
-> No control on instance placement
7. Capacity Reservations
It doesn’t provide you any cost benefit but gives you surety that you will not run out of capacity.
-> Doesn’t require any commitment. You can create capacity reservation when you need it and cancel it when you don’t need it. Its that simple.
-> Capacity reservation happens in a specific availability zone
-> Doesn’t provide any billing discount
Thanks for reading
A handful guide to make the developerslife easy.