There's a few instance purchasing options available for EC2 instances:
On-demand Instances - This is when you can't predict how long/short the job is going to be, so you just get a pay-as-you-go option. Billing for this is as follows: For Linux = billed every second, after the first minute (yes, this is a bit complicated) but for all other operating systems = billed per hour.
Reserved Instances - This is for steady usage apps (like databases) which are long-term (a minimum of 1 year). This has up to a 75% discount compared to on-demand. You can buy it for 1 year to 3 years and obviously, 3 years RI has a much higher discount than 1 year RI. Also, you can pay all upfront, partially upfront and no upfront and all upfront has a much higher discount than no upfront. There are also 2 other types of RIs:
Convertible RIs (you can change the type of instance type, e.g. t2.micro to c5.large; these have up to a 54% discount).
Scheduled RIs (launch within the time window you need them but you still need to reserve it!).
Spot Instances - This is for work that is alright if it fails, so things like image processing, batch jobs and any distributed workloads. These have a 90% discount compared to on-demand! But that's because they can be lost at any point of time if someone else pays higher for it (kind of like bidding).
Dedicated Hosts - This is for companies with strict compliance requirements. It's a whole physical; server dedicated just to you! And you need to be pretty rich to have this aka it is very expensive. Allocated for 3 years so they need to be committed to. Access to the underlying hardware.
Dedicated Instances - Basically dedicated hosts but you don't have access to the underlying hardware. Pay by the hour.
Last updated