When purchasing an Amazon EC2 instance, there are several options to choose from. In this article, I will cover summarize them, compare them, and explain their properties.
- On-Demand Instances: On-Demand instances are EC2 instances that you can launch and pay for by the hour or by the second, depending on the instance type. With On-Demand instances, you pay for the instances that you use without any upfront payment or long-term commitment. This pricing model is ideal for short-term or unpredictable workloads that do not require a specific capacity reservation.
- Reserved Instances: Reserved Instances allow you to reserve EC2 capacity for a period of one or three years and receive a discounted hourly rate compared to On-Demand instances. There are three types of Reserved Instances: Standard, Convertible, and Scheduled. Standard Reserved Instances offer the deepest discounts but are the least flexible, while Convertible Reserved Instances offer greater flexibility but with slightly lower discounts. Scheduled Reserved Instances allow you to reserve capacity for specific time windows within a week.
- Savings Plan: Savings Plans is a flexible pricing model that provides savings on your EC2 usage in exchange for a commitment to use a certain amount of compute power for a one- or three-year term. Savings Plans provide discounts on EC2 usage regardless of instance family, size, OS, tenancy, or AWS Region.
- Spot Instances: Spot Instances enable you to bid on spare EC2 capacity and run your workloads at a significantly lower cost than On-Demand instances. Spot Instances are available at up to 90% off the On-Demand price, but the availability of these instances is not guaranteed, and they can be terminated when the spot price rises above your bid.
- Dedicated Hosts: Dedicated Hosts provide physical EC2 servers that are dedicated to your use, enabling you to bring your existing server-bound software licenses to the cloud. With Dedicated Hosts, you have full control over the placement of your instances and can use them to meet compliance requirements.
- Dedicated Instances: Dedicated Instances are EC2 instances that run on hardware that is dedicated to your use but shared among instances from your account. With Dedicated Instances, you can launch instances in a VPC subnet that is dedicated to your use, ensuring that your instances do not share the underlying hardware with instances from other accounts.
- Capacity Reservations: Capacity Reservations enable you to reserve capacity for specific instance types in a specific Availability Zone. With Capacity Reservations, you can ensure that you have the capacity you need when you need it, and your instances are launched automatically within your reservation. Capacity Reservations can be used with On-Demand instances, Reserved Instances, and Spot Instances.
Here is a summary table of the features and differences between Amazon EC2 instance purchasing options:
On-Demand Instances | Reserved Instances | Convertible Reserved Instances | Spot Instances | Dedicated Hosts | Dedicated Instances | Capacity Reservations | |
---|---|---|---|---|---|---|---|
Payment | Hourly | Upfront + Hourly | Upfront + Hourly | Hourly | Upfront + Hourly | Upfront + Hourly | Upfront |
Contract Length | None | 1 to 3 years | 1 to 3 years | None | None | None | 1 year |
Price | Highest | Lower than On-Demand | Lower than Reserved Instances | Variable | Highest | Higher than On-Demand | Lower than On-Demand |
Flexibility | Most flexible | Less flexible | More flexible | Most flexible | Less flexible | Less flexible | Less flexible |
Availability | Always available | Availability Zone-specific | Availability Zone-specific | Availability Zone-specific | Always available | Always available | Availability Zone-specific |
Usage | Short-term, unpredictable | Long-term, predictable | Long-term, predictable | Short-term, flexible | Long-term, predictable | Long-term, predictable | Steady-state, predictable |
Instance Configuration | Fixed | Fixed | Convertible | Fixed | Variable | Variable | Fixed |
Cost Savings | None | Up to 75% | Up to 54% | Up to 90% | None | None | Up to 72% |
Note that the table is not exhaustive and the actual pricing and features may vary depending on the instance type, region, and other factors. It’s important to evaluate your specific use case and requirements before deciding which EC2 instance purchasing option to choose.
EC2 on-demand instances
EC2 On-Demand instances are a type of Amazon EC2 instance that allows you to pay for the compute capacity that you use on a per-hour or per-second basis, without any upfront payment or long-term commitment. With On-Demand instances, you can launch instances when you need them, and you only pay for the compute capacity that you use. This pricing model is ideal for workloads that have unpredictable usage patterns, or for applications that require short-term, burstable compute capacity.
EC2 On-Demand instances offer several benefits, including:
- No upfront payment or long-term commitment: You only pay for the compute capacity that you use on a per-hour or per-second basis, with no upfront payment or long-term commitment required.
- Elasticity and scalability: You can launch and terminate instances as needed, and you can easily scale up or down to meet changes in demand.
- Flexible pricing: On-Demand instances are priced by the hour or by the second, depending on the instance type, and you can use them for as long or as short as you need.
- Availability: On-Demand instances are available in all AWS regions and availability zones, and you can launch them on demand without waiting for capacity to become available.
- No minimum usage requirements: There are no minimum usage requirements for On-Demand instances, so you can use them for as little or as much as you need without any penalties or fees.
On-Demand instances are a flexible and cost-effective option for workloads that require short-term or unpredictable compute capacity. With On-Demand instances, you have the flexibility to launch and terminate instances as needed, and you only pay for the compute capacity that you use.
EC2 reserved instances (RI)
EC2 Reserved Instances (RIs) are a type of Amazon EC2 instance that allows you to reserve capacity for a period of one or three years and receive a significant discount on the hourly rate compared to On-Demand instances. With Reserved Instances, you commit to using a specific instance configuration and capacity for a fixed period, in exchange for a lower hourly rate. This pricing model is ideal for workloads that have predictable usage patterns or require long-term capacity.
EC2 Reserved Instances offer several benefits, including:
- Cost savings: RIs offer significant discounts on the hourly rate compared to On-Demand instances, with discounts of up to 75% for Standard Reserved Instances and up to 64% for Convertible Reserved Instances.
- Capacity reservation: RIs allow you to reserve capacity for a specific instance configuration and capacity for a fixed period, ensuring that the capacity you need is always available when you need it.
- Instance flexibility: RIs are flexible, allowing you to change the instance size or family within the same instance type or to exchange them for a new RI of equal or greater value.
- Availability: RIs are available in all AWS regions and availability zones, and you can purchase them at any time.
- No upfront payment or long-term commitment: RIs offer the option to pay upfront for the entire RI term to receive the largest discount, or to pay partially upfront and receive a lower discount. You can also choose to pay entirely hourly and still receive a smaller discount compared to On-Demand instances.
Reserved Instances are a cost-effective option for workloads with predictable usage patterns or long-term capacity requirements. By reserving capacity for a fixed period, you can receive a significant discount on the hourly rate, ensuring that you can meet your capacity needs while staying within your budget.
EC2 convertible reserved instances (CRI)
A Convertible Reserved Instance (CRI) is a type of EC2 Reserved Instance that offers greater flexibility than a Standard Reserved Instance. With a CRI, you can change the instance type or family during the term of the reservation, as well as apply the remaining value of the reservation to a different instance type or family. This flexibility allows you to adapt to changes in your workload or take advantage of new instance types or families that are released during the term of your reservation.
Convertible Reserved Instances offer several benefits over Standard Reserved Instances, including:
- Greater flexibility: CRIs allow you to change the instance type or family during the term of the reservation, providing greater flexibility to adapt to changes in your workload or take advantage of new instance types or families.
- Savings: Like Standard Reserved Instances, CRIs offer a discount compared to On-Demand instances, allowing you to save money on your compute costs.
- Capacity reservation: Like Standard Reserved Instances, CRIs allow you to reserve capacity for a specific instance configuration and capacity for a fixed period, ensuring that the capacity you need is always available when you need it.
- Availability: CRIs are available in all AWS regions and availability zones, and you can purchase them at any time.
- No upfront payment or long-term commitment: CRIs offer the option to pay upfront for the entire RI term to receive the largest discount, or to pay partially upfront and receive a lower discount. You can also choose to pay entirely hourly and still receive a smaller discount compared to On-Demand instances.
Convertible Reserved Instances provide greater flexibility than Standard Reserved Instances, allowing you to adapt to changes in your workload or take advantage of new instance types or families while still receiving cost savings compared to On-Demand instances.
RI vs CRI
Here’s a table comparing Reserved Instances (RI) and Convertible Reserved Instances (CRI):
Feature | Reserved Instances (RI) | Convertible Reserved Instances (CRI) |
---|---|---|
Instance Type and Family Flexibility | Instance type/family cannot be changed during the term of the reservation | Instance type/family can be changed during the term of the reservation |
Capacity Reservation | Capacity reserved for specific instance type and family for a fixed period | Capacity reserved for specific instance type and family for a fixed period |
Discount | Significant discount compared to On-Demand instances | Significant discount compared to On-Demand instances |
Availability | Available in all regions and availability zones | Available in all regions and availability zones |
Upfront Payment and Commitment | Option to pay upfront for the entire RI term or partially upfront with a lower discount; one- or three-year commitment | Option to pay upfront for the entire CRI term or partially upfront with a lower discount; one- or three-year commitment |
Instance Type Exchange | Not possible | Possible, with remaining value of reservation applied to new instance type/family |
Pricing Model | Fixed pricing for the term of the reservation | Fixed pricing for the term of the reservation, with the ability to modify the reservation |
EC2 Spot Instances
EC2 Spot Instances are a type of Amazon EC2 instance that allow you to bid on unused EC2 capacity in the AWS cloud, and can provide significant cost savings compared to On-Demand and Reserved Instances. With Spot Instances, you can request capacity at a lower price than the On-Demand price, and AWS will allocate capacity to the highest bidder at any given time. The price of a Spot Instance varies depending on supply and demand in the AWS cloud, and can change rapidly based on availability of unused capacity.
Spot Instances offer several benefits, including:
- Cost savings: Spot Instances offer significant cost savings compared to On-Demand and Reserved Instances, with potential discounts of up to 90%.
- Flexible pricing: Spot Instance pricing varies based on supply and demand in the AWS cloud, allowing you to take advantage of unused capacity when it’s available.
- Availability: Spot Instances are available in all AWS regions and availability zones, and can be launched using the same AMIs as On-Demand and Reserved Instances.
- Instance types and families: Spot Instances offer the same instance types and families as On-Demand and Reserved Instances, allowing you to choose the instance that best meets your needs.
- Auto Scaling: Spot Instances can be used with Auto Scaling to automatically launch and terminate instances based on changes in demand.
- Interruption notice: Spot Instances can be interrupted with two minutes’ notice when the Spot price exceeds your bid, allowing you to save money without risking data loss or application downtime.
Spot Instances provide a flexible and cost-effective way to run workloads that can handle interruptions and don’t require constant availability, making them a great choice for batch processing, data analysis, and other workloads with flexible time requirements.
EC2 Savings Plans
EC2 Savings Plans are a flexible pricing model for EC2 instances that offer significant cost savings compared to On-Demand instances. With Savings Plans, you commit to a certain amount of EC2 usage (measured in dollars per hour) for a period of one or three years, and in exchange, you receive a discount on your EC2 usage. Savings Plans provide savings of up to 72% compared to On-Demand instances, depending on the commitment term and the amount of usage you commit to.
Savings Plans offer several benefits, including:
- Cost savings: Savings Plans offer significant cost savings compared to On-Demand instances, with potential discounts of up to 72%.
- Flexibility: Savings Plans offer more flexibility than Reserved Instances, as they can be applied to any instance type in any AWS region, and you can change your usage commitments at any time.
- Automatic discount: Savings Plans provide an automatic discount on your EC2 usage, without requiring you to purchase a specific instance type or family.
- No upfront payment: Savings Plans do not require an upfront payment, making them a more flexible option than Reserved Instances.
- No long-term commitment: Savings Plans offer a one- or three-year commitment term, providing long-term savings without requiring a long-term commitment.
- Usage visibility: Savings Plans provide detailed usage reporting, so you can monitor your EC2 usage and ensure that you’re maximizing your cost savings.
EC2 Savings Plans are a flexible and cost-effective way to save on EC2 usage, with significant cost savings compared to On-Demand instances and more flexibility than Reserved Instances.
Dedicated Hosts
Amazon EC2 Dedicated Hosts are physical servers fully dedicated to your use, offering increased control and flexibility over your Amazon EC2 instances. With Dedicated Hosts, you can launch instances on a physical server that is fully dedicated to your account, and have complete control over the underlying hardware, including the processor type, number of sockets, and amount of memory. Dedicated Hosts also offer visibility and control over instance placement, allowing you to ensure that instances are placed on specific hosts to meet licensing and regulatory requirements.
Dedicated Hosts offer several benefits, including:
- Isolation: Dedicated Hosts provide complete isolation between instances, ensuring that your instances run on dedicated hardware that is not shared with other customers.
- License compliance: Dedicated Hosts allow you to bring your own software licenses, and ensure that your instances run on hardware that meets licensing and regulatory requirements.
- Control: Dedicated Hosts provide complete control over the underlying hardware, including the ability to choose the processor type, number of sockets, and amount of memory.
- Cost savings: Dedicated Hosts can provide cost savings for certain types of workloads, particularly those with high licensing costs.
- Flexibility: Dedicated Hosts can be used with a variety of EC2 instance types, and can be launched on demand or with reserved capacity.
- Visibility: Dedicated Hosts provide visibility into the underlying hardware, including the number of sockets, cores, and memory, as well as the ability to view the host ID and ARN for each host.
Amazon EC2 Dedicated Hosts provide increased control and flexibility over your Amazon EC2 instances, and can be a good option for workloads that require dedicated hardware or specific license compliance. However, they can be more expensive than other EC2 instance types, so it’s important to evaluate the cost and benefits before deciding to use Dedicated Hosts.
Dedicated Instances
Amazon EC2 Dedicated Instances are instances that run on hardware that is dedicated to a single customer account. Unlike Dedicated Hosts, which provide physical servers dedicated to your use, Dedicated Instances provide virtual instances that run on hardware that is dedicated to your account.
Dedicated Instances offer several benefits, including:
- Isolation: Dedicated Instances provide complete isolation between instances, ensuring that your instances run on hardware that is not shared with other customers.
- Compliance: Dedicated Instances can be used to meet compliance and regulatory requirements that require dedicated hardware, such as HIPAA or PCI.
- Predictability: Dedicated Instances provide predictable performance and availability, as the underlying hardware is dedicated to your account and is not shared with other customers.
- Flexibility: Dedicated Instances can be used with a variety of EC2 instance types, and can be launched on demand or with reserved capacity.
- Security: Dedicated Instances can provide an additional layer of security, as they run on hardware that is dedicated to your account and is not shared with other customers.
- License compliance: Dedicated Instances can help you meet licensing requirements for certain types of software that require dedicated hardware.
Amazon EC2 Dedicated Instances provide increased isolation, compliance, predictability, and security for your EC2 instances. However, they can be more expensive than other EC2 instance types, so it’s important to evaluate the cost and benefits before deciding to use Dedicated Instances.
EC2 Capacity Reservations
EC2 Capacity Reservations allow you to reserve capacity for your EC2 instances in a specific Availability Zone, ensuring that the capacity is available when you need it. With Capacity Reservations, you can reserve capacity for a specific instance type in a specific Availability Zone for a period of one year, providing predictability and availability for your EC2 instances.
Capacity Reservations offer several benefits, including:
- Availability: Capacity Reservations ensure that capacity is available when you need it, providing high availability for your EC2 instances.
- Predictability: Capacity Reservations provide predictability for your EC2 instances, as the capacity is reserved for your use and is not shared with other customers.
- Flexibility: Capacity Reservations can be used with a variety of EC2 instance types, and can be modified or canceled at any time.
- Cost savings: Capacity Reservations can provide cost savings for certain types of workloads, particularly those with steady-state usage that require reserved capacity.
- Capacity planning: Capacity Reservations can help you plan your capacity needs more effectively, as they provide visibility into the available capacity in a specific Availability Zone.
EC2 Capacity Reservations provide increased availability and predictability for your EC2 instances, and can be a good option for workloads that require reserved capacity or steady-state usage. However, they are not as flexible as On-Demand instances, so it’s important to evaluate the cost and benefits before deciding to use Capacity Reservations.
Conclusion
Amazon offers many options for EC2 instances. Take the time to analyze and predict your usage and then create a plan that is most cost-effective for your intended use.