AWS for DevOps — Pricing Models
1 minute read
14.1 — Pricing Models
AWS offers multiple pricing models. Understanding them is the foundation of cost optimization.
Real-World Analogy
Think of AWS pricing like renting a car:
- On-Demand = taxi (pay per ride, most expensive, most flexible)
- Reserved = monthly lease (commit to 1-3 years, big discount)
- Savings Plans = fuel discount card (commit to spending $X/hour, flexible on vehicle type)
- Spot = standby flight (cheapest, but you might get bumped)
The Four EC2 Pricing Models
| Model |
Discount |
Commitment |
Interruption |
Best For |
| On-Demand |
0% (baseline) |
None |
No |
Unpredictable workloads, dev/test |
| Reserved (1 yr) |
~30-40% |
1 year |
No |
Steady-state production |
| Reserved (3 yr) |
~50-60% |
3 years |
No |
Long-term databases |
| Savings Plans |
~20-30% |
$/hour for 1-3 yr |
No |
Flexible, multiple instance types |
| Spot |
~60-90% |
None |
Yes (2 min warning) |
Batch jobs, CI/CD, stateless |
Pricing Example: m5.xlarge in ap-south-1
| Model |
Hourly Rate |
Monthly (730 hrs) |
Annual |
Savings |
| On-Demand |
$0.192 |
$140 |
$1,682 |
— |
| Reserved (1 yr, no upfront) |
$0.124 |
$91 |
$1,086 |
35% |
| Reserved (1 yr, all upfront) |
$0.114 |
$83 |
$999 |
41% |
| Savings Plan (1 yr) |
$0.137 |
$100 |
$1,201 |
29% |
| Spot (typical) |
$0.058 |
$42 |
$508 |
70% |
Beyond EC2: Other Service Pricing
| Service |
Pricing Model |
Key Cost Drivers |
| S3 |
Per GB stored + per request |
Storage class, request count |
| RDS |
Instance hours + storage |
Instance size, multi-AZ, storage IOPS |
| Lambda |
Per request + per GB-second |
Invocation count, memory, duration |
| Data Transfer |
Per GB out of AWS |
Cross-region, internet egress |
| NAT Gateway |
Per hour + per GB processed |
Data flowing through NAT |
| CloudWatch |
Per metric/alarm/log GB |
Custom metrics, log ingestion |
The Hidden Costs
| Cost |
Easy to Miss |
Typical Monthly |
| NAT Gateway data processing |
$0.045/GB |
$50-500 |
| Data transfer between AZs |
$0.01/GB |
$10-100 |
| Idle Elastic IPs |
$3.65/IP/month |
$4-40 |
| Unattached EBS volumes |
Varies by size |
$10-200 |
| Stopped EC2 with EBS |
EBS still charges |
$10-100 |
| CloudWatch detailed monitoring |
$0.30/metric/month |
$5-50 |
Common Mistakes
| Mistake |
Why It Hurts |
Fix |
| Using On-Demand for everything |
Paying full price |
Commit with Reserved/Savings Plans |
| Not tracking data transfer costs |
Surprise bills |
Monitor NAT Gateway and cross-AZ transfer |
| Forgetting about stopped resources |
Still paying for EBS, EIPs |
Terminate what you don’t need |
| Choosing the wrong storage class |
Paying premium for infrequent data |
Use S3 Intelligent-Tiering |
Next → Cost Explorer & Budgets