There are four pricing models for EC2 instances:
- On-Demand instance
- On-Demand pricing is also known as pay-as-you-go. Pay-as-you-go is a pricing model that allows you to pay only for those resources that you use.
- You need to pay for the compute capacity by per hour or per second that depends on which instances you run.
- On-Demand instance does not require any upfront payments.
- While using On-Demand instance, you can increase or decrease the compute capacity based on the requirements of your application.
- On-Demand instances are recommended for those applications which are of short term and unpredictable workloads.
Users that want low cost and flexibility on EC2 instances with no upfront payments. - On-Demand instances are used for those applications which have been developed or tested on EC2 for the first time.
- Reserved instance
- Reserved instance is the second most important pricing model that reduces the overall cost of your AWS environment by making an upfront payment for those services that you know will be used in the future.
- Reserved instances provide a discount of up to 75% as compared to On-Demand instance.
- Reserved instances are assigned to a specific Availability zone that reserves the compute capacity for you so that you can use whenever you need.
- Reserved instances are mainly recommended for those applications that have steady state and require reserve capacity.
- Customers who want to use the EC2 over 1 to 3 term can use the reserved instance to reduce the overall computing costs.
- Spot instance
- Spot instances consist of unused capacity which is available at a highly discounted rate.
- It offers up to 90% discount as compared to On-Demand instance.
- Spot instances are mainly recommended for those applications which have flexible start and end times.
- It is useful when applications require computing capacity at a very low price.
- It is useful when applications require additional amount of computing capacity at an urgent need.
- Dedicated Hosts
- It is a physical EC2 server which is dedicated for your use. It reduces the overall costs by providing you a VPC that comprise of a dedicated hardware.