Instance Types and Pricing Models
Compare On-Demand, Reserved, Spot, and Savings Plans pricing and match each to the right workload pattern.
Instance Types and Pricing Models is a free AWS Solutions Architect lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Solutions Architect learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
EC2 Instance Type Families
EC2 instance types are organised into families that optimise for specific workloads. General Purpose (M, T): balanced CPU, memory, network—web servers, small databases. Compute Optimised (C): high CPU ratio—batch processing, media transcoding, ML inference. Memory Optimised (R, X, U): high RAM ratio—in-memory databases, real-time big data analytics. Storage Optimised (I, D, H): high I/O for local NVMe SSDs—databases with heavy random I/O. Accelerated Computing (P, G, Inf, Trn): GPUs/custom silicon for ML training and HPC.
Burstable T-Series Instances
The T-series (t3, t3a, t4g) instances are burstable—they earn CPU credits when running below their baseline CPU utilisation and spend credits to burst above the baseline. A t3.micro has a 10% CPU baseline; it can burst to 100% CPU if credits are available. T Unlimited mode (the default) allows bursting beyond the credit balance for a small additional charge. T instances are cost-efficient for workloads with low average but spiky CPU—dev environments, small websites, build servers.
# Check CPU credit balance for a T instance
aws cloudwatch get-metric-statistics \
--namespace AWS/EC2 \
--metric-name CPUCreditBalance \
--dimensions Name=InstanceId,Value=i-0abcdef1234567890 \
--start-time 2024-01-01T00:00:00Z --end-time 2024-01-02T00:00:00Z \
--period 3600 --statistics AverageOn-Demand Instances
On-Demand instances are billed per second (Linux) or per hour (Windows) with no upfront commitment. You start and stop them at any time and pay only for what you run. On-Demand is ideal for: irregular, unpredictable workloads; short-term testing and development; and applications that cannot tolerate interruptions. It is the most flexible pricing model but the most expensive per hour compared to Reserved or Spot.
Reserved Instances (RIs)
Reserved Instances provide a significant discount (up to 72%) compared to On-Demand in exchange for a 1- or 3-year commitment. You can choose between three payment options: All Upfront (largest discount), Partial Upfront, or No Upfront (smallest discount). RIs are ideal for steady-state, predictable workloads like production web servers and databases that run continuously. RI discounts are applied automatically to matching On-Demand usage in your account.
# List your Reserved Instances
aws ec2 describe-reserved-instances \
--query 'ReservedInstances[].{ID:ReservedInstancesId,Type:InstanceType,State:State}' \
--output tableSavings Plans
AWS Savings Plans are a flexible alternative to RIs that offer the same discount levels (up to 72%) in exchange for a 1- or 3-year commitment to a specific dollar-per-hour spend. Compute Savings Plans apply to any EC2 instance type, Region, OS, or tenancy, and also cover Fargate and Lambda—the most flexible. EC2 Instance Savings Plans are locked to a specific instance family in a Region but offer a higher discount. Use Cost Explorer to find the optimal commitment amount based on your historical usage.
Spot Instances
Spot Instances use spare EC2 capacity and can offer up to 90% discount compared to On-Demand prices. The catch: AWS can interrupt a Spot instance with a two-minute warning when it needs the capacity back. Spot is ideal for fault-tolerant, stateless, interruptible workloads: batch jobs, data analysis, CI/CD build pipelines, machine learning training. Never use Spot for stateful databases, real-time user-facing services, or anything that cannot recover gracefully from interruption.
# Request a Spot instance
aws ec2 request-spot-instances \
--instance-count 2 \
--type one-time \
--launch-specification file://spot-spec.jsonSpot Fleets and Diversification
A Spot Fleet is a collection of Spot (and optionally On-Demand) instances that maintains a target capacity. By diversifying across multiple instance types, families, and AZs, a Spot Fleet reduces the chance that all instances are interrupted at the same time (since interruption rates vary by type and AZ). Specify an AllocationStrategy: lowestPrice minimises cost, diversified spreads across pools for resilience, and capacityOptimized picks the pools with the most available capacity.
Dedicated Hosts vs Dedicated Instances
For licensing or compliance requirements: Dedicated Instances run on hardware dedicated to your account but the physical host may be shared with other instances from the same account. Dedicated Hosts give you a physical server entirely to yourself, with visibility into sockets and cores—required for per-socket or per-core software licenses (Oracle, Windows Server). Dedicated Hosts are also priced per host per hour, are more expensive, and can be Reserved for discount. Most workloads do not need dedicated hardware.
Choosing the Right Pricing Model
Match the pricing model to the workload pattern: On-Demand for unpredictable or short-lived workloads; Reserved / Savings Plans for steady-state production workloads that run 24/7; Spot for batch, stateless, or interruptible processing; Dedicated Hosts for BYOL licensing compliance. A common exam pattern: a 3-tier web application uses Savings Plans for the always-on app tier, Spot for nightly batch jobs, and On-Demand for periodic burst capacity.
ARM-Based Graviton Instances
AWS Graviton processors (Graviton2, Graviton3) are custom ARM-based chips designed by AWS. Graviton instances (T4g, M6g, C6g, R6g, etc.) offer up to 40% better price/performance than comparable x86 instances. They are ideal for cloud-native workloads that compile and run on ARM: Linux web servers, containerised microservices, Java and Go applications. If you see exam questions about cost-efficiency for Linux workloads, consider Graviton instances as a strong option alongside Spot and Savings Plans.
Instance Type Naming Convention
EC2 instance type names follow a consistent pattern: [family][generation][attributes].[size]. For example: m6g.xlarge = M-family (general purpose), 6th generation, Graviton (g), xlarge (4 vCPU, 16 GB RAM). Attribute suffixes: d = NVMe local storage, n = enhanced networking, a = AMD processor, i = Intel, g = Graviton ARM. Sizes from nano → micro → small → medium → large → xlarge → 2xlarge → ... → 48xlarge (vCPUs and memory double with each size step in most families).
Quick Check
Test your understanding of AWS Solutions Architect (SAA-C03) concepts from this lesson.
Lesson Recap
In this lesson you learned: instance families (M, C, R, I, P) are optimised for different CPU/memory/storage ratios, On-Demand is flexible, Reserved/Savings Plans discount steady workloads, and Spot is cheapest for interruptible tasks, and Graviton ARM instances offer the best price-performance for cloud-native Linux workloads. Next up we explore Security Groups and Key Pairs for EC2 network security.
Frequently asked questions
Is the “Instance Types and Pricing Models” lesson free?
Yes — the full text of “Instance Types and Pricing Models” is free to read here on the web, and the AWS Solutions Architect course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Solutions Architect course, upgrade to CoddyKit PRO.
What will I learn in “Instance Types and Pricing Models”?
Compare On-Demand, Reserved, Spot, and Savings Plans pricing and match each to the right workload pattern. You practise AWS Solutions Architect with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start AWS Solutions Architect?
No prior experience is required. AWS Solutions Architect on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Instance Types and Pricing Models” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this AWS Solutions Architect lesson?
Yes. Every AWS Solutions Architect lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Launching Your First EC2 Instance
- Instance Types and Pricing Models
- Security Groups and Key Pairs
- EC2 Storage: Instance Store vs EBS