Ref: https://learn.cantrill.io/courses/1820301/lectures/41301338 and https://learn.cantrill.io/courses/1820301/lectures/41301339
EC2 Purchase Options = EC2 Launch Types - Overview
- 🔧 Different options & trade-offs when it comes to launching EC2 instances
- Discounts vs Flexibility: pay less $$$ if you commit in advance or give up flexibility otherwise (e.g. allowing your instances to get interrupted)
- Pay extra for Reserved Capacity: make sure your instances will be prioritized to be kept alive when EC2 capacity is low
- Pay extra for Dedicated HW: not sharing HW with other customers comes at a cost
- 💡 Naming:
- EC2 purchase options → official name
- EC2 launch types → unofficial name
EC2 Shared Hosts
- 🔧 Shared HW → instances launched in EC2 host that may contain instances from other customers
- Default
- Billing: ONLY instance fee, which includes:
- per-second instance fee (billed for how long instance runs)
- associated storage capacity fee (billed for how long you keep storage)
- Diagram (each color indicates instances from different customers)
- Customers have no control over HW
- Instances of different sizes run on the same EC2 hosts → consumption of a defined allocation of resources
- Instances from different AWS customers share the same HW
- Instances still isolated from each other → no interaction with instances from different customers, no awareness of what other stuff is hosted
- On-Demand, Spot and Reserved instances use shared hosts
EC2 On-Demand Instances
- 🔧 Default EC2 Purchase Option, average of everything without specific pros or cons
- 💡 Choose a different purchase option ONLY when you can justify so

- Characteristics:
- No interruption
- No capacity reservation
- Not prioritized when a lot of AWS HW fails
- Consider an alternative if instances are business critical
- Predictable pricing
- Per-second billing while instance is running (but not when stopped or terminated)
- Storage consumes capacity if instance is running or stopped → terminate instance if you don't want to get billed for storage (but you can't recover the instance after that)
- No upfront cost
- No discounts
- 💡 Starting price very reasonable (AWS can efficiently allocate resources)
- Best use cases
- Short-term or unknown workloads
- Apps which can NOT be interrupted
EC2 Spot Instances
- 🔧 Instances run on spare EC2 capacity (spot capacity) → you bid for spare capacity
- 👍 Very cheap (up to 90% cheaper than on-demand instances)
- 👎 Instances will be shut down when spot capacity becomes scarce, i.e. when spot price becomes higher than the max price you were willing to pay
- ‼️ Apps that use spot instances must tolerate interruptions!!
