Understanding Dedicated vs Reserved vs Spot EC2 Instances in Amazon Web Services

by Justin Cook

Understanding Dedicated vs Reserved vs Spot EC2 Instances in Amazon Web Services

May 28 

Written By Justin Cook

by Justin Cook

Amazon EC2 Spot Instances

Spot Instances allow the customer to buy the unused EC2 capacity in the AWS cloud. Spot Instances are available at up to a 90% discount compared to On-Demand prices.

โ€œYou can use Spot Instances for various stateless, fault-tolerant, or flexible applications such as big data, containerized workloads, CI/CD, web servers, high-performance computing (HPC), and other test & development workloads. Because Spot Instances are tightly integrated with AWS services such as Auto Scaling, EMR, ECS, CloudFormation, Data Pipeline, and AWS Batch, you can choose how to launch and maintain your applications running on Spot Instances.โ€

The key is really the combination of using Spot Instances with On-Demand and RIs to further optimize workload cost with performance in the correct way.

โ€œDue to the operating scale of AWS, Spot Instances can offer the scale and cost savings to run hyper-scale workloads.โ€

Note: You also have the option to hibernate, stop, or terminate your Spot Instances when EC2 reclaims the capacity with two minutes of notice, but make sure you do this within the two-minute time or your instance will be terminated. Only on AWS, do you have easy access to unused compute capacity at such a massive scale โ€“ all at up to a 90% discount.

Combining Spot Instances with RIs and On-Demand Instances using EC2 Auto Scaling to optimize workload cost with performance is one of my favorite Use cases include:

  • Big data & machine learning workloads by using Spot Instances with Amazon EMR, Hadoop, or Spark to process large data set
  • Containers since they are mostly stateless, you can use ECS, EKS, or self-managed Kubernetes clusters
  • CI/CD pipelines with EC2 spot fleet plug-in
  • Optimal web performance during peak times by breaking the budget with EC2 fleet with a load balancer
  • High-performance computing to accelerate parallel workloads

Amazon EC2 Reserved Instances

Next are Amazon EC2 Reserved Instances, also known as RIs, which provide a significant discount (up to 75%) compared to On-Demand pricing and provide a capacity reservation when used in a specific Availability Zone. RIs provide you with a significant discount (up to 75%) compared to On-Demand instance pricing. You have the flexibility to change families, OS types, and tenancies while benefitting from RI pricing when you use Convertible RIs. RIs can provide a capacity reservation, offering additional confidence in your ability to launch the number of instances you have reserved when you need them.

Understanding these RI types is critical:

  • Standard RIs: These provide the most significant discount (up to 75% off On-Demand) and are best suited for steady-state usage.
  • Convertible RIs: These provide a discount (up to 54% off On-Demand) and the capability to change the attributes of the RI as long as the exchange results in the creation of Reserved Instances of equal or greater value. Like Standard RIs, Convertible RIs are best suited for steady-state usage.
  • Scheduled RIs: These are available to launch within the time windows you reserve. This option allows you to match your capacity reservation to a predictable recurring schedule that only requires a fraction of a day, a week, or a month.

Remember that RIs can provide a significant discount compared to running instances On-Demand. They can be offered under three upfront payment options to provide you with payment flexibility at the point of purchase.

There are two classes of RIs: Convertible and Standard. Convertible RIs can be exchanged for different Convertible RIs of equal or greater value.

  • Term: AWS offers Standard RIs for 1-year or 3-year terms. Reserved Instance Marketplace sellers also offer RIs often with shorter terms. AWS offers Convertible RIs for 1-year or 3-year terms.
  • Payment option: You can choose between three payment options: All Upfront, Partial Upfront, and No Upfront. If you choose the Partial or No Upfront payment option, the remaining balance will be due in monthly increments over the term.

When the attributes of the RI match the attributes of a used instance, the discount of the RI is applied and the capacity reservation is utilized. These attributes are:

  • Instance type: Instance types comprise varying combinations of CPU, memory, storage, and networking capacity. For example, m4.2xlarge.
  • Platform description: RIs can be purchased for Amazon EC2 instances running Linux/UNIX, SUSE Linux, Red Hat Enterprise Linux, Microsoft Windows Server, and Microsoft SQL Server platforms.
  • Tenancy: If you are using instances with a default tenancy, purchase default tenancy Reserved Instances. If you are using dedicated instances, purchase Reserved Instances with a tenancy of dedicated.
  • Availability Zone: By selecting an Availability Zone, the RI you purchase will provide a capacity reservation and a discount for the use of instances in the selected Availability Zone. When an Availability Zone isnโ€™t specified, the RI discount will apply to a running instance of any size (within the same family) in the region

Note: If you purchase a large number of RIs in an AWS region, you will automatically receive discounts on your upfront fees and hourly fees for future purchases of RIs in that AWS region. RIs are sold by third-party sellers on the Reserved Instance Marketplace, who occasionally offer even deeper discounts at shorter terms. On that note, Reserved Instance Marketplace allows other AWS customers to list their Standard RIs for sale. Third-party Standard RIs are no different from the Standard Reserved Instances purchased directly from AWS except they are often listed at lower prices and shorter terms.

Dedicated Instances

Last are the Dedicated Instances. These are run in a VPC on hardware thatโ€™s dedicated to a single customer. Your Dedicated instances are physically isolated at the host level from instances that belong to other accounts. Dedicated instances may share hardware with other instances from the same AWS account that are not Dedicated instances.

Pay for Dedicated Instances On-Demand, save up to 70% by purchasing Reserved Instances or save up to 90% by purchasing Spot Instances. Spot instances allow you to bid on unused Amazon EC2 capacity and pay by the hour.

  • Dedicated Reserved Instances provide a capacity reservation so that you can have confidence in your ability to launch the number of instances you have reserved when you need them. Dedicated Reserved Instances also provide you with a significant discount (up to 75%) compared to On-Demand instance pricing

ยท Dedicated Spot instances have the same price as standard Spot instances Also pricing for these can be tricky but here is a link to help: https://aws.amazon.com/ec2/pricing/dedicated-instances/

You can also use Dedicated Hosts to launch Amazon EC2 instances on physical servers that are dedicated for your use. Dedicated Hosts give you additional visibility and control over how instances are placed on a physical server, and you can reliably use the same physical server over time. As a result, Dedicated Hosts enable you to use your existing server-bound software licenses like Windows Server and more.

Note: This blog doesnโ€™t cover dedicated hosts but an Amazon EC2 Dedicated Host (โ€œDedicated Hostโ€ or โ€œhostโ€) is a physical server with EC2 instance capacity fully dedicated to your use.

Dedicated Hosts can save you money by enabling you to leverage your existing server-bound software license investments (e.g., Windows Server, Windows SQL Server, and SUSE Linux Enterprise Server) within EC2, subject to your license terms. Dedicated Hosts also give you more flexibility, visibility, and control over the placement of instances on dedicated hardware. This makes it easier to ensure you deploy your instances in a way that meets your compliance and regulatory requirements.

Justin Cook