Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Compute is usually 40–60% of a cloud bill, and the difference between picking on-demand and picking the right commitment can be 70%. But commitments lock you in: a three-year reservation on the wrong instance family is a real loss. Spot/preemptible can save another 70% on top, but only for workloads you can checkpoint or restart cheaply. You need to know all four levers before your first finance review.
Pull live spot prices and compare them to on-demand for the same instance family on AWS and GCP.
# Spot price history for the last hour
aws ec2 describe-spot-price-history \
--instance-types t3.medium \
--product-descriptions "Linux/UNIX" \
--start-time $(date -u -v-1H '+%Y-%m-%dT%H:%M:%S' 2>/dev/null || date -u -d '1 hour ago' '+%Y-%m-%dT%H:%M:%S') \
--max-results 5 \
--query 'SpotPriceHistory[*].{az:AvailabilityZone,price:SpotPrice,ts:Timestamp}' \
--output table
# Savings Plans available rates
aws savingsplans describe-savings-plans-offering-rates \
--service-codes AmazonEC2 \
--max-results 3