AWS provides several purchasing options for Amazon EC2 instances to help optimize costs based on workload requirements. Each option is suited for different usage patterns and levels of flexibility.
- On-Demand Instances
- Spot Instances
- Reserved Instances
- On-Demand Capacity Reservations
¶ On-Demand Instances
- Instances that can be launched at any time and are available within minutes
- Billed at a flat hourly rate based on instance type
- Charged per second while running
- No long-term commitment
- Payment stops when the instance is stopped or terminated
- Short-term workloads
- Irregular or unpredictable workloads
- Applications that cannot be interrupted
- Testing and development environments
- Use unused EC2 capacity at significant discounts compared to On-Demand pricing
- Pricing is variable and determined by AWS supply and demand
- Users specify a maximum price they are willing to pay
- Instances may be interrupted if:
- Spot price exceeds the maximum price
- AWS no longer has available Spot capacity
- Interruption behavior options:
- Fault-tolerant and interruption-resilient applications
- Batch processing
- Background or asynchronous data processing
- Provide discounted pricing for specific EC2 instance types
- Best for long-term, predictable workloads
- Commitment terms:
- Cannot be canceled once purchased
- All Upfront
- Full payment made at the start
- Highest discount
- No additional hourly charges
- Partial Upfront
- Smaller upfront payment
- Discounted hourly rates for remaining usage
- No Upfront
- No upfront payment
- Lowest discount
¶ Standard Reserved Instances
- Highest discounts
- Can modify:
- Availability Zone
- Instance size within the same instance family
- Cannot change instance family
- Can be bought and sold in the AWS Reserved Instances Marketplace
- Lower discount compared to Standard RIs
- Can be exchanged for another Convertible RI with different:
- Instance family
- Instance type
- Platform
- Cannot be bought or sold in the Reserved Instances Marketplace
¶ On-Demand Capacity Reservations
- Reserve EC2 capacity in a specific Availability Zone
- Attributes include:
- No fixed term (can be created or canceled at any time)
- No pricing discounts
- Guaranteed capacity availability
- No long-term commitment
- Immediate access to required instance capacity
- Can be combined with:
- Reserved Instances
- EC2 Instance Savings Plans
- Savings Plans offer discounts in exchange for a commitment to a consistent level of compute usage over time