0
0
AWScloud~10 mins

EC2 pricing models (on-demand, reserved, spot) in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - EC2 pricing models (on-demand, reserved, spot)
Start
Choose Pricing Model
On-Demand
Pay per
hour
Flexible
No long
term
Use EC2 Instance
End
This flow shows how you pick an EC2 pricing model and what happens next: On-Demand means pay as you go, Reserved means commit and save, Spot means bid for cheap but risk interruption.
Execution Sample
AWS
Choose pricing model:
if On-Demand:
  pay hourly
elif Reserved:
  commit 1-3 years
  pay less
elif Spot:
  bid for capacity
  risk interruption
This code chooses an EC2 pricing model and applies its payment and usage rules.
Process Table
StepPricing Model ChosenPayment TypeCommitmentCost BehaviorRisk
1On-DemandPay per hourNo commitmentFlexible, higher costNo risk of interruption
2ReservedPay upfront or partial1-3 yearsLower cost, save moneyNo risk of interruption
3SpotBid for capacityNo commitmentLowest costCan be interrupted anytime
4End---Pricing model selected and applied
💡 Execution stops after pricing model is chosen and payment rules are set.
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3Final
Pricing ModelNoneOn-DemandReservedSpotSelected
Payment TypeNonePay per hourPay upfront or partialBid for capacitySet
CommitmentNoneNo commitment1-3 yearsNo commitmentSet
Cost BehaviorNoneFlexible, higher costLower costLowest costSet
RiskNoneNo risk of interruptionNo risk of interruptionCan be interrupted anytimeSet
Key Moments - 3 Insights
Why does Spot pricing have a risk of interruption?
Spot instances use unused capacity that can be taken back by AWS anytime, as shown in step 3 of the execution_table where risk is 'Can be interrupted anytime'.
Does Reserved pricing require payment upfront?
Reserved pricing can require upfront or partial payment for 1-3 years commitment, as shown in step 2 of the execution_table under 'Payment Type' and 'Commitment'.
Can On-Demand pricing be stopped anytime without penalty?
Yes, On-Demand pricing has no long-term commitment and no interruption risk, as shown in step 1 of the execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, which pricing model requires a 1-3 year commitment?
AOn-Demand
BReserved
CSpot
DNone
💡 Hint
Check the 'Commitment' column in the execution_table rows.
At which step does the risk of interruption appear?
AStep 1
BStep 2
CStep 3
DStep 4
💡 Hint
Look at the 'Risk' column in the execution_table.
If you want the lowest cost but accept possible interruptions, which pricing model should you choose?
ASpot
BOn-Demand
CReserved
DNone
💡 Hint
Refer to 'Cost Behavior' and 'Risk' columns in the execution_table.
Concept Snapshot
EC2 Pricing Models:
- On-Demand: pay hourly, no commitment, flexible, higher cost
- Reserved: commit 1-3 years, pay upfront or partial, lower cost
- Spot: bid for unused capacity, lowest cost, can be interrupted
Choose based on cost vs. flexibility needs.
Full Transcript
This visual execution shows how AWS EC2 pricing models work. You start by choosing a pricing model: On-Demand, Reserved, or Spot. On-Demand means paying hourly with no long-term commitment and no risk of interruption. Reserved requires a 1-3 year commitment with upfront or partial payment, offering lower cost and no interruption risk. Spot lets you bid for unused capacity at the lowest cost but can be interrupted anytime. The execution table tracks each step's payment type, commitment, cost behavior, and risk. Key moments clarify why Spot can be interrupted and Reserved requires commitment. The quiz tests understanding of commitment, interruption risk, and cost trade-offs. This helps beginners see how pricing choices affect cost and usage.