Understanding EC2 Pricing: A Comprehensive Guide
What is Elastic Compute Cloud EC2 (Elastic Compute Cloud) is a web service from AWS that provides scalable computing capacity in the cloud. With EC2 instances, AWS aims to eliminate the complexities of purchasing and maintaining your own hardware for your computing requirements. AWS provides Amazon Machine Images (AMIs) which act as a template for […]
February 12, 2024
by Heera Ravindran
8 mins Read
Table of Contents
- What is Elastic Compute Cloud
- Amazon EC2 Pricing Model
- On-demand Instances
- Savings Plan
- Spot Instances
- Reserved Instances
- How to Optimize EC2 Costs on AWS?
- Dedicated Hosts
- Per second billing
- Rightsizing underutilized resources
- Autoscaling
- Choose Savings Plan over RI
- How to Calculate EC2 Pricing and Savings Plan Discounts
- Conclusion
What is Elastic Compute Cloud
EC2 (Elastic Compute Cloud) is a web service from AWS that provides scalable computing capacity in the cloud. With EC2 instances, AWS aims to eliminate the complexities of purchasing and maintaining your own hardware for your computing requirements.
AWS provides Amazon Machine Images (AMIs) which act as a template for your EC2 instances. It is also possible to customize your EC2 instances based on your CPU utilization, memory, storage, and network capacity. Customers can either choose from the published Amazon machine images or customize their own EC2 images from these base images as required.
Having a clear understanding of EC pricing models and EC2 cost optimization techniques is essential to run a feasible cloud infrastructure. AWS provides various pricing models and savings plans for EC2 instances. It’s important to get an understanding of these for subsequent AWS Cost Optimization.
Amazon EC2 Pricing Model
AWS free tier enables its customers to explore the AWS services for free, up to a certain limit. This includes 750 hours of Linux and Windows instances of type t2.micro for one month up to one year. You can use t3.micro in regions where t2.micro is unavailable. It also includes 750 hours of public IPv4 addresses free per month for EC2 instances (for any instance type).
Once you exceed the free tier limit, standard EC2 pricing will be applicable based on your resource consumption. AWS follows a pay-as-you-go model and you pay only for what you use. Based on your workload and resource requirements there are four types of EC2 pricing models based on your instances.
On-demand Instances
On-demand instances are the default EC2 instances for which you pay only for the capacity you use. The compute capacity is billed by the hour or second based on the instance type you use. With On-demand instances, there is no need for any up-front payments or long-term commitments. The compute capacity can also be resized based on your requirements.
The pricing for an on-demand instance includes the cost of running your public or private AMIs on a specific operating system. For example, the pricing table below explains the price of a few EC2 instance types based on Linux and Windows operating systems in the US East (Ohio) region.
Instance name | vCPU | Memory | Network Performance | On-demand hourly rate |
t3.micro (Linux) | 2 | 1 GiB | Upto 5 Gigabit | $0.0104 |
t3.xlarge (Linux) | 4 | 16 GiB | Upto 5 Gigabit | $0.1664 |
m7i.large (Windows) | 2 | 8 GiB | Upto 12500 Megabit | $0.1928 |
c6a.metal (Windows) | 192 | 384 GiB | 50000 Megabit | $16.176 |
Savings Plan
Savings plan has a more flexible pricing model than on-demand instances. It offers discounted rates on EC2 instances and some other AWS services in exchange for a commitment to a consistent amount of usage for a 1 to 3 year term. Instances are charged at a rate of $/hour. These instances are suitable for applications that require consistent computing capacity.
There are two types of Savings plans:
- Compute Savings Plan: It is the most flexible savings plan that helps to reduce your costs by up to 66%. These plans apply automatically to your EC2 instance usage regardless of the instance family, size, Availability zone, Region, OS, or tenacity.
- EC2 Instance Savings Plan: This plan offers a discount of up to 72% which is the lowest rate. This plan requires a commitment to the usage of individual instance families in a particular region. It automatically reduces your cost on the selected instance family in that region regardless of AZ, size, OS, or tenacity. It also gives you the flexibility to change between instances within the same family in that region.
The table below is a comparison of on-demand and savings plan pricing of different EC2 instances, for 1 year with no upfront payments.
Instance name | On-demand rate | Savings Plan rate | Savings over on-demand | Tenacity |
m4.4xlarge (Linux) | $0.80 | $0.5699 | 29% | Shared |
c6a.8xlarge (Ubuntu Pro) | $1.28 | $0.92932 | 27% | Shared |
r5.xlarge (Windows) | $0.451 | $0.382 | 15% | Dedicated Instance |
x1.32xlarge (Windows) | $20.56 | $16.285 | 21% | Dedicated Instance |
Spot Instances
Spot instances are available at a discount of up to 90% compared to on-demand pricing. This type of instance is suitable for applications with urgent computing needs. The spot instance prices are set by Amazon EC2 based on the long-term trends in supply and demand. For spot instances, you pay the spot price that is in effect for the period that your spot instance is running.
Spot instances are the most flexible kind of pricing model as lower charges will apply automatically as you change your usage or instance type as your organization evolves. The following table lists the current spot price of different EC2 instances for the US East (N. Virginia) region,
Instance name | Linux/UNIX usage | Windows usage | Instance family |
g5.48xlarge | $6.1199 | $15.0175 | GPU Instances – Current Generation |
r7a.metal-48xl | $5.5144 | $13.3016 | Memory Optimized – Current Generation |
i4i.metal | $4.3642 | $10.0528 | Compute Optimized – Current Generation |
m7i.48xlarge | $3.9695 | $12.4959 | General Purpose – Current Generation |
Reserved Instances
Reserved instances are suitable for applications that require steady usage. It provides a discount of up to 72% compared to on-demand instances. When assigned to a specific AZ, reserved instances provide capacity reservation which permits you to launch your instances whenever you need them.
Reserved instance EC2 pricing is classified as Standard and Convertible Reserved Instance pricing models
- Standard Reserved Instances: These instances provide a discount of 72% compared to on-demand instances. It can be purchased for a 1-year or 3-year term based on your requirements. You can also change the AZ, instance size, and networking type of your Standard Reserve Instances.
- Convertible Reserve Instances: These instances provide a discount of up to 66% compared to on-demand instances and can be purchased for a 1-year or 3-year term. In addition, it provides the flexibility to change the instance families, OS, or tenacity over the Reserved Instances.
RI costs can be paid in full, or partial upfront payment, or no upfront payment. The following table shows the EC2 pricing of RI for a period of 1 year with an all upfront fee.
Instance name | RI upfront fee | RI effective hourly rate | On-demand price | Savings over on-demand rate |
t4g.nano (Linux) | $22 | $0.003 | $0.0042 | 40% |
t2.xlarge (Windows) | $1299 | $0.148 | $0.2266 | 35% |
m7g.medium (Linux) | $245 | $0.028 | $0.0408 | 31% |
c7a.large (Windows) | $1412 | $0.161 | $0.1946 | 17% |
How to Optimize EC2 Costs on AWS?
EC2 Cost optimization helps you to optimize your cloud spending while helping you to build a scalable infrastructure that meets your demand. These EC2 cost optimization strategies effectively manage your cloud cost while maintaining the performance and capacity that you require.
Dedicated Hosts
A Dedicated host is a physical EC2 server that is fully reserved for your use. This is suitable for workloads looking for a dedicated physical server.
Choosing a dedicated host to run your application helps you reduce your EC2 cost by enabling you to utilize your current server-bound licenses. This helps you to reduce your licensing costs. You can purchase a Dedicated host On-demand on an hourly basis or as part of your savings plan.
Per second billing
Per second billing is an EC2 cost optimization technique that removes unused minutes and seconds from your bill. This technique is useful for instances running over irregular time periods, like testing, data analytics, batch processing, etc.
EC2 utilization is billed in 1-second increments, with a minimum duration of 60 seconds. Per second billing is available for Amazon Linux and Windows instances across all Regions and AZs. It is applicable across all EC2 pricing models.
Rightsizing underutilized resources
Identify the instances that have low utilization and reduce costs by stopping or rightsizing them. You can use AWS Cost Explorer Resource Optimization report to get the list of instances that are either idle or have low utilization. You can also use services like AWS Instance Scheduler to automatically stop the instances or use AWS Operations Conductor to automatically resize the instances, based on the recommendations from Cost Explorer.
Autoscaling
Autoscaling is the technique of automatically adjusting the capacity of your EC2 instances by scaling in or scaling out the instances, based on the incoming workload. It helps to increase fault tolerance at the lowest price possible. An autoscaling group is a logical collection of EC2 instances that work together to maintain the steady performance of the application.
Choose Savings Plan over RI
Though both Savings Plan and RI are cost-saving options from AWS, Savings Plan offers more flexibility. With Savings Plan, you commit to a certain amount of usage, rather than a specific instance type or family. This allows you to apply savings to a wider range of EC2 instance types, sizes, and regions.
Savings Plan do not require capacity reservation. Thus, you need not pay for unused capacity, or be limited by instance availability in a specific AZ. Also, Savings Plan applies automatic discounts to your EC2 usage, regardless of the instance type, size, family, operating system, or region.
How to Calculate EC2 Pricing and Savings Plan Discounts
To calculate EC2 discounts effectively, understanding the potential cost savings over on-demand prices is crucial. Use our AWS EC2 Pricing Calculator to navigate your options and find tailored solutions.
- Initiate the Calculation: Access the calculator to kickstart your journey towards streamlined AWS cost management.
- Detail Your Requirements: Specify your instance type, region, number of instances, and intended usage duration. These inputs are crucial for an accurate estimation.
- Discover Cost-Efficient Solutions: Our calculator contrasts the estimated monthly costs across on-demand, 1-year, and 3-year commitment pricing, guiding you to the most efficient configurations for your scenario.
- Informed Decision Making: Equipped with precise calculations, decide on the optimal AWS EC2 commitment that aligns with your budgetary and operational blueprints.
Conclusion
In conclusion, by understanding EC2 pricing models like On-demand instances, spot instances, Savings Plan, and Reserved Instances and implementing effective cost optimization strategies organizations achieve significant cost savings. By following these techniques and staying informed about the latest pricing details, you can gain maximum value from your cloud investments. To know more about Savings Plan and other EC2 pricing details, use our AWS Pricing Calculator.
Looking to reduce your AWS Costs?
As more and more businesses prefer cloud services over traditional IT infrastructure, creating a cost-optimized cloud infrastructure while maintaining optimal performance is crucial for a sustainable business. Book a free demo with Economize today and we will help you reduce your AWS costs by up to 30% within 10 minutes.s
More Like this
Top 7 Cost-Saving Tips for AWS EBS Snapshots
July 24, 2024
Azure Reservations vs Savings Plans: Pros & Cons Explained
October 23, 2024