EC2 instances are virtual machines running on AWS physical hardware, billed by the second. Pick a size, pick an OS, pay while it runs. What this guide covers is everything that comes after the instance families, the four pricing models, and the specific reason most teams running EC2 at scale are leaving 30–50% of their compute budget on the table every month.
What Does EC2 Stand For?
EC2 stands for Elastic Compute Cloud. "Elastic" means you can scale capacity up or down programmatically. "Compute" is the CPU and RAM your workload uses. "Cloud" means the hardware is AWS-managed and shared across customers via virtualization.
When you launch an instance, AWS allocates a specific amount of CPU, memory, network bandwidth, and storage I/O to that virtual machine. When you stop or terminate it, those resources return to the shared pool.
Instance Families: Choose Wrong and You're Paying Before You Even Pick a Pricing Model
AWS organizes EC2 instances into families based on the workload they're built for. The main buckets:
- General Purpose (t3, t4g, m5, m6i, m7i): balanced CPU/memory for web servers, dev/test, small databases
- Compute Optimized (c5, c6i, c6g, c7g): high CPU, lower memory for batch processing, HPC, gaming servers
- Memory Optimized (r5, r6i, x2idn): high memory ratios for in-memory databases, SAP HANA, Redis
- Storage Optimized (i3, i4i, d3): high sequential I/O for distributed file systems, data warehousing
- Accelerated Computing (p3, p4d, g4dn, trn1, inf2): GPU/FPGA for ML training, video encoding, HPC
Within each family, the naming convention is consistent. m6i.large means: M family (general purpose), 6th generation, Intel processor, large size (2 vCPU, 8 GiB RAM). m6i.2xlarge doubles it: 4 vCPU, 16 GiB RAM.
The processor suffix is where most teams leave money
The g suffix (Graviton, AWS-designed ARM) costs roughly 10–20% less than Intel equivalents at comparable performance. For stateless Linux workloads, web servers, API layers, containerized services migrating to Graviton requires no application code changes and delivers immediate cost reduction on the next billing cycle.
- No suffix or i = Intel (m6i, c6i)
- a = AMD (m6a, c6a), slightly cheaper than Intel
- g = Graviton ARM (m6g, c6g), cheapest of the three for Linux workloads Pick the wrong processor suffix and you're paying an Intel premium on a workload that would run identically on Graviton at 15% less.\
The Four Pricing Models
On-Demand
No commitment, no upfront cost, no discount. AWS bills by the second (minimum 60 seconds).
An m6i.large in us-east-1 runs ~$0.096/hr. Run 50 of them 24/7 and the annual bill hits ~$42,000 with zero discount applied. On-demand is the right model for genuinely unpredictable workloads. For anything running consistently beyond 30 days, it's not a pricing model, it's a penalty for not committing.
Spot Instances
AWS sells unused capacity at 60–90% below on-demand. The catch: AWS can reclaim Spot capacity with a two-minute warning. That same m6i.large might run at $0.012/hr on Spot, but your workload needs to tolerate interruption. Suitable for fault-tolerant batch jobs, CI/CD pipelines, ML training runs, and stateless web tiers with proper interruption handling.
Reserved Instances (RI)
A 1- or 3-year commitment to a specific instance type in exchange for 30–60% off on-demand. The m6i.large on a 1-year no-upfront RI comes to ~$0.061/hr a 36% discount. The problem: you commit to a specific instance type, size, and region for up to three years. If your workload changes, you own the commitment.
Savings Plans
Introduced in 2019, Savings Plans offer RI-like discounts in exchange for a spend commitment (e.g., $0.05/hr) rather than an instance type commitment. Compute Savings Plans apply to EC2 regardless of instance family, size, OS, or region, the most flexible commitment option AWS offers natively.
A 1-year Compute Savings Plan on m6i.large is approximately $0.064/hr (~33% off on-demand). EC2 Instance Savings Plans are less flexible but give deeper discounts (up to 66% on 1-year terms; 3-year all-upfront Reserved Instances can reach 72% on specific families).
What It Actually Costs: A Worked Example
20 x m6i.xlarge instances running 24/7 in us-east-1:
- On-Demand: ~$27,648/month (~$331,776/year)
- 1-yr Savings Plan (no upfront): ~$17,856/month (~$214,272/year)
- 3-yr Savings Plan (no upfront): ~$12,384/month (~$148,608/year) The gap between pure on-demand and a 1-year Savings Plan in this scenario is $117,504/year. For a team that has never purchased a commitment, that is entirely recoverable spend.
If you want a direct comparison of Savings Plans vs Reserved Instances before deciding your commitment strategy, we covered it in detail here AWS Savings Plans vs Reserved Instances: A Practical Guide to Buying Commitments
The Structural Risk in Commitment Purchasing
Unused Savings Plan commitments are not refunded. Commit to $1.00/hr and only use $0.60/hr of eligible compute. You pay the full $1.00/hr and absorb the $0.40/hr shortfall. AWS does not reimburse underutilized commitments.
There's a second problem: AWS Cost Explorer recommends commitment amounts based on data that is 72+ hours old. If your usage patterns shift, AWS's recommendation lags. At $6,000–12,000/day in uncovered compute spend, that lag is a computable cost.
How to Actually Reduce EC2 Costs: Four Levers Ranked by Impact
Right-size before committing. Committing to oversized instances locks in waste. Use AWS Compute Optimizer to identify instances where the average CPU is below 10–15%. These are right-sizing candidates before any commitment purchase.
Purchase commitments at the right coverage level. Target 80–85% of your baseline compute covered by commitments. Keep 15–20% on-demand to absorb spikes. Over-committing is a harder mistake to reverse than under-committing.
Use Spot for interruption-tolerant workloads. Batch jobs, CI/CD, ML training, Spark clusters all Spot candidates. Mixing Spot with on-demand via Auto Scaling Groups is the standard pattern.
Automate commitment management. Manual commitment reviews happen monthly or quarterly. In a cloud environment where workloads change weekly, that creates coverage gaps.
Usage.ai refreshes EC2 commitment recommendations every 24 hours 3x faster than AWS native tooling. At $6,000–12,000/day in uncovered workloads, the 48-hour advantage in coverage timing compounds to $18,000+ per refresh cycle in recoverable on-demand spend. Insured Flex Commitments apply Savings Plan and RI-equivalent discounts of 30–60% without requiring multi-year lock-in, and every commitment purchased carries a buyback guarantee if your usage shifts and the commitment goes underutilized, Usage.ai buys it back in real cashback, not credits. Setup takes 30 minutes, requires billing-layer access only, and the fee is a percentage of realized savings.
EC2 Cost Optimization Checklist
Before purchasing any commitments:
- Rightsizing audit: export the last 30 days of CPU/memory utilization from Compute Optimizer. Downsize instances below 20% average CPU before committing.
- Idle instance check: instances with 0% network I/O for 7+ days are termination candidates.
- Baseline compute calculation: sum the hourly on-demand cost of instances running at least 200 hours/month. That's your commitment target range.
- Spot candidate identification: stateless, fault-tolerant, batch workloads go to Spot. Stateful, latency-sensitive, real-time API workloads stay on committed or on-demand.
- Coverage gap analysis: in Cost Explorer, filter to EC2 compute and group by purchase option. The on-demand percentage of your stable workload is your uncovered spend.
For teams running GPU instances (p3, p4d, g4dn) on consistent ML training pipelines, Savings Plans deliver among the highest absolute dollar savings available worth modeling separately before your next commitment purchase.
What's the commitment mistake you see most often on your team over-committing to the wrong instance type, or just never committing at all?
Continue with the complete technical article here → What Are EC2 Instances: Types, Pricing & How to Stop Overpaying



Top comments (0)