Table of Contents

AWS. EC2 Pricing, EC2 Cost Optimization Strategies, Cloud Cost Management

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.

AWS EC2, Amazon Machine Image, Custom AMI, EC2 cost optimization
Source: AWS Docs

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.

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 namevCPUMemoryNetwork
Performance
On-demand
hourly rate
t3.micro
(Linux)
21 GiBUpto 5 Gigabit$0.0104
t3.xlarge
(Linux)
416 GiBUpto 5 Gigabit$0.1664
m7i.large
(Windows)
28 GiBUpto 12500 Megabit$0.1928
c6a.metal
(Windows)
192384 GiB50000 Megabit$16.176
EC2 Pricing for On-demand Instances

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 nameOn-demand rateSavings Plan rateSavings over
on-demand
Tenacity
m4.4xlarge
(Linux)
$0.80$0.569929%Shared
c6a.8xlarge
(Ubuntu Pro)
$1.28$0.9293227%Shared
r5.xlarge
(Windows)
$0.451$0.38215%Dedicated Instance
x1.32xlarge
(Windows)
$20.56$16.28521%Dedicated Instance
On-demand vs Savings plan

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 nameLinux/UNIX usageWindows usageInstance family
g5.48xlarge$6.1199$15.0175GPU Instances – Current Generation
r7a.metal-48xl$5.5144$13.3016Memory Optimized – Current Generation
i4i.metal$4.3642$10.0528Compute Optimized – Current Generation
m7i.48xlarge$3.9695$12.4959General Purpose – Current Generation
EC2 Pricing for Spot Instances

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 nameRI upfront feeRI effective hourly rateOn-demand priceSavings over
on-demand rate
t4g.nano
(Linux)
$22$0.003$0.004240%
t2.xlarge
(Windows)
$1299$0.148$0.226635%
m7g.medium
(Linux)
$245$0.028$0.040831%
c7a.large
(Windows)
$1412$0.161$0.194617%
EC2 Pricing for Reserved Instances

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.

Autoscaling, Rightsizing EC2 instances, AWS EC2, EC2 cost optimization
Source: AWS Docs

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.

  1. Initiate the Calculation: Access the calculator to kickstart your journey towards streamlined AWS cost management.
  2. Detail Your Requirements: Specify your instance type, region, number of instances, and intended usage duration. These inputs are crucial for an accurate estimation.
  3. 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.
  4. 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 like Per second billing, and autoscaling, 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.