AWS- EC2 Instances Purchasing Options
OnDemand Instances (EC2—>instances)
- Pay per second for the running instances.
- The lifecycle of these instances can be controlled by you.
- You can decide when to Start/Stop/Terminate/Hibernate/Reboot.
- No long-term commitment is required.
- The price per second is fixed.
Use Case
For short term application
For an irregular workload that cannot be interrupted.
Reserved Instances
Amazon EC2 Reserved Instances (RI) provide a significant discount (up to 72%) compared to On-Demand pricing and provide a capacity reservation when used in a specific Availability Zone.
- If purchasing option for the EC2 instance is 1 year to 3 years then the Reserved Instance type is the best option.
- 3 Payment options are available for RI – upfront, Partial upfront, No Upfront
- Reserved Instances are charged even there is no use.
- Purchased RI is non-refundable.
Use Case
For Long Term application
Discounted option as compared to On-Demand Instances.
Spot Instances
- Because Spot Instances enable you to request unused EC2 instances at steep discounts, you can lower your Amazon EC2 costs significantly
- The hourly price for a Spot Instance is called a Spot price.
- Price is less than On-Demand Instances
- These are selected on the basis of a bid that satisfies the requirement of EC2 instances.
Use Cases
Data Analytics
Batch jobs
Background processes
How long do AWS spot instances last?
Regular spot pricing—instances can be terminated with 2 minutes notice. Defined duration—you can get a spot instance guaranteed to run for a period of 1-6 hours.