AWS EC2 Instance Purchasing Options
Dear Reader, In one of my previous post I helped you launch an EC2 instance from AWS console. We launched an instance when we needed(on-demand), we did some experiment and then we terminated the instance.
However, please note that there are a lot more in EC2 instance then on-demand. In this post I will let you know various EC2 instance purchasing options AWS provides you so that you can serve your workload in the most cost effective manner.
Stay with me to know more about them.
AWS EC2 Instance Purchasing Options
- On-Demand Instances
- Reserved Instances
- Savings Plans
- Spot Instances
- Dedicated Hosts
- Dedicated Instances
- Capacity Reservations
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. You can find price per second here.
- AWS doesn’t guarantee that your instance will be launched. Although AWS always tries to launch your instance and to be honest I have never faced that I requested an on-demand instance and it’s not launched But there still can be peak load on AWS side when your instance is not launched on request
- 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 Instances
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.
Important Note: Previously there uses to be a Scheduled Reserved Instances option in reserved instances. which lets you reserve capacity that is scheduled to recur daily, weekly, or monthly, with a specified start time and duration, for a one-year term. But as of now AWS is not offering this. You can check more details here
3. Savings Plans
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 Instances
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 Instances
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
As I said in On-Demand section that AWS doesn’t gives 100% guarantee that your instance will be launched. What if you need some capacity reserved but don’t want to go on long term commitment of 1 or 3 year.
In this case you can reserve capacity and you can cancel it if you don’t need it. 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
In this quick article, I shared with you the EC2 instance purchasing options provided by AWS so that you can balance your cost with your requirement.
We learnt that On-Demand is the most flexible at the same time costilest option to launch your instance while Spot instances are cheapest but they can be taken back from you at any time.
Savings Plan is a good option when you are buying an instance for a long term like 1 or 3 years. As it allows you to change certain configurations at later times, it doesn’t make sense to go with reserved instances any more.
Dedicated host you can think of when you have some compliance requirement or you want you reuse your existing server license.
I hope this post was useful to you. feel free to ask questions in comment sections.
Enjoyed the content?
Subscribe to our newsletter below to get awesome AWS learning materials delivered straight to your inbox.
I hope you enjoyed this tutorial. If you have a question, feel free to drop in comment. I will be more then happy to answer your query.
Meanwhile you can also –
- Difference between AWS Root user and IAM User
- Attach an IAM Role to an EC2 Instance using CloudFormation
- Create an S3 Bucket using CloudFormation
- Understand IAM PassRole to Secure your AWS Infrastructure
- AWS S3 Encryption: Ways to Secure Your Data in S3
- How to Create S3 Bucket using CloudFomation
- AWS S3 Storage Classes: Everything You Need to Know
- How to Create S3 Bucket Policy using CloudFomation
- Provision ACM certificate using CloudFormation
- AWS SQS Standard vs FIFO Queue
- Create SSM Parameter using CloudFormation