AWS t2.mediumvsAWS t4g.medium
t2.medium
t4g.medium
t2.medium vs t4g.medium: how to choose
t2.medium pairs 2 vCPUs with 4GB of RAM at $0.0464/hr On-Demand (about $33/mo at 24×7). t4g.medium pairs 2 vCPUs with 4GB at $0.0336/hr (~$24/mo). t4g.medium is 28% cheaper per hour than t2.medium ($0.0128/hr gap).
These are different generations of the same series. **t4g.medium** is the newer generation, and AWS's pattern across generations is fairly consistent: ~10–15% better single-thread, 15–30% better multi-core, and similar or modestly higher per-hour pricing — so the price/performance per dollar usually improves with each generation. **t2.medium** is still available and still works (AWS doesn't retire instance types quickly), but for new workloads the newer generation is typically the better default unless you have a specific reason to pin to the older AMI or there's a meaningful regional pricing advantage today.
On raw price-per-performance, the two are t4g.medium delivers ~63% more single-thread Sysbench score per dollar (49569 vs 81042 points per $1/hr). That's the cleanest signal we have for "which one runs your workload faster per dollar," but it only matters if your workload is single-thread-bound; for parallel workloads the multi-core scores (4051 vs 5244) are what to weigh. Spot pricing flips many of these comparisons — when t2.medium drops to $0.0153/hr and t4g.medium drops to $0.0159/hr, the cheap-per-hour winner can swing meaningfully.
In practice, pick t2.medium when your workload is closer to burstable general-purpose (bursty traffic — web apps, dev/test boxes, CI runners, small databases). Pick t4g.medium when it's closer to burstable general-purpose (bursty traffic — web apps, dev/test boxes, CI runners, small databases). When neither side is obviously right, the cheaper hourly rate usually wins for fault-tolerant batch workloads, while the higher single-core score usually wins for latency-sensitive web traffic. The regional pricing tables linked from each instance page below show where each is currently cheapest — sometimes a >20% regional gap flips the comparison entirely.
On-Demand Price Comparison
Monthly trajectory
Spot Price Comparison
30-Day daily trajectory