T Series EC2 Instances

The EC2 T series instances are probably the most used instance types when getting started with AWS. They're cost-effective and versatile EC2 instances so they're an all-around great choice for general computing.

They're especially great for variable workloads—like a web app that gets busy during peak hours and quiet during off-hours.

The current options are:

  • t2: Older and less efficient, but still available (and free tier eligible as t2.micro)
  • t3: Intel-based, more efficient than t2 (sometimes available in the free tier)
  • t3a: AMD-based, often cheaper than t3
  • t4g: ARM-based, typically the most cost-effective if your workload is compatible

Here's a closer look at these different instance types:

Instance TypeProcessorvCPUsMemory (GiB)Network PerformanceCPU CreditsPrice (per hour)*Use Cases
t2Intel Xeon1-80.5-32Low to ModerateFixed credit systemHigherBasic apps with occasional bursts
t3Intel Xeon Scalable2-81-32Up to 5 GigabitUnlimited burstingLower than t2Broad range needing better performance
t3aAMD EPYC2-81-32Up to 5 GigabitUnlimited bursting~10% lower than t3Cost savings without sacrificing performance
t4gAWS Graviton4 (ARM)2-81-32Up to 5 GigabitUnlimited burstingLowestARM-compatible apps needing optimal price/performance

Hardware Differences: Nitro and Graviton

The t3, t3a, and t4g instances are all built on the newer AWS Nitro System. Nitro is AWS's modern virtualization software and hardware that gives us:

  • Improved Performance: Less virtualization overhead means more of the hardware's power is available to your instances.
  • Better Network Performance: You get higher bandwidth and lower latency, which is great for network-intensive applications.
  • Enhanced Security: Nitro provides hardware-level isolation between instances, reducing the attack surface.

tl;dr nitro is newer and better so t3, t3a, and t4g are newer and better.

As for processors, t4g instances use AWS Graviton4 ARM-based chips designed by AWS. We can get up to 40% better price-performance compared to similar x86-based instances. If you can run your application on ARM, switching to t4g is a good call.

I personally use t4g the most and try to build and run everything on ARM.

The main reason to use the older t2.micro is that it's part of the free tier. So it's what we'll use in the examples in this course. But if it wasn't for the free tier, we'd be using t3 for x86 and t4g for arm.

Understanding CPU Credits and Burstable Performance

One thing you might have noticed about the table above is the CPU credits section. Which begs the question: "What the heck is a CPU credit?"

The T series instances are part of AWS's "Burstable Performance" family. They use a CPU credit system that lets instances burst above their baseline CPU performance when needed. This keeps costs low as long as you're not maxing out the CPU all the time.

You can "burst" up to 100% CPU utilization for a bit, but you need to let the instance chill-out at lower CPU usage to earn credits for future bursts.

It might sound a bit weird because it's not how normal computers work, but let's break it down.

How CPU Credits Work

Each T series instance has a baseline performance, which is a percentage of the CPU you can use continuously without dipping into your CPU credits. For micro instances, that's 10% CPU utilization. When you operate below this baseline, you earn CPU credits. When you operate above the baseline, you use CPU credits.

For reference, here's a quick example of me installing bun and setting up a Next.js dev server. The CPU usage spikes whenever I do something processor intensive, but settles back down and doesn't spike for basic HTTP requests.

Show timestamps
00:00
We've set up a t2.micro because that's part of the Free Tier, but there are hundreds of
00:05
different EC2 instance types that we can actually choose from.
00:08
But we're going to be focusing on the T series instances. That's the t2, t3, and t4
00:14
because they're generally good for most tasks we'll need in the beginning, until you have a
00:20
specific need where you'd want a different instance type.
00:23
But they're also the most affordable—the cheapest instances.
00:27
So, really good when we're getting started. The t2.micro is what we have in the Free
00:31
Tier, but there are newer and better instances, like t3 is something you might want to
00:37
use if you need x86, and t4g
00:40
uses the new Graviton processors, which are ARM processors.
00:44
These are much faster and cheaper if your applications can run on the ARM architecture.
00:51
And these newer ones also use the AWS Nitro System, which basically uses dedicated
00:57
AWS-built hardware to manage things like
01:00
networking and storage, instead of leaving that all up to the old hypervisor.
01:06
So the t4g and the t3s are definitely newer. They're much better to use, but generally
01:10
we get the t2 in the Free Tier. But they're all part of the T Series burstable instance types.
01:17
So we'll be using t2, but generally if I'm not in the Free Tier or worried about that, I
01:21
always go for a t4g for most of my applications.
01:25
And the pricing for this, like I said, is fairly cheap. So the t4g.nano, if I
01:32
copy this price, that's per hour,
01:36
times 24 hours a day, times, let's say, 31 days in a month.
01:40
That is only going to be three dollars and twelve cents per month. Or if we go
01:43
for the next one up, that's just two times the price there.
01:47
So the t4g.micro is only six dollars and twenty-four cents per month.
01:51
It's definitely in the cheaper range, but we can even go cheaper. So for one month
01:55
of the t4g.micro, that's six dollars and twenty-four cents.
01:58
But if we were to look at Reserved Instances—that's over here—we can actually
02:05
prepay for certain instances and save way more money.
02:10
So let's say I want the t4g.micro again and I'm willing to
02:16
pay upfront for three years of this instance type, then I could
02:20
pay eighty-three dollars for three years of that t4g.nano.
02:24
So if I look at the price of that over,
02:29
say, thirty-six months, that's actually going to be two dollars and thirty cents per month.
02:33
So that is really, really affordable. And generally, I will go with the t4g.micro or a
02:39
t4g class anytime that I deploy something to an EC2 instance.
02:43
But like I said, these T Series instances are burstable instances.
02:48
So you really should understand something about that before you just commit to using these.
02:53
The burstable instances basically have a baseline
02:58
CPU utilization, and the table for that is here for all the different T types.
03:02
So for a t4g.micro, the baseline is ten
03:06
percent CPU utilization, and you have this whole credit system.
03:10
So essentially, if you set up one of these instances and
03:14
the CPU utilization is below the baseline, you earn credits.
03:18
As soon as your CPU utilization goes above the baseline, you start to spend these credits.
03:23
So you're essentially saving up credits during low CPU usage times, so you can burst
03:29
to higher utilization when you need it for your specific application.
03:34
So if this was a web app that wasn't being used heavily most of the time, but had
03:38
spikes throughout the day, this is a really good instance to use.
03:42
This article goes through the details pretty well, but I'm just going to do a quick overview here.
03:47
Here's an example. You spend credits per minute.
03:50
If I use one hundred percent utilization of my virtual
03:54
CPU for an entire minute, then I'm going to use one single credit.
03:58
But if I go down to the table here, let's say I'm on a t4g.micro, I earn twelve
04:05
credits for every hour that I'm at zero percent CPU utilization.
04:09
And as long as I'm below ten percent, I'm still earning credits; it's just a percentage of that.
04:13
But as soon as I go above ten percent utilization, I'm going to start spending credits based on those equations.
04:19
They have a little graph at the bottom here somewhere that shows
04:22
this might be typical CPU utilization for a specific app that you're running.
04:26
A lot of the time, you're going to be below what the baseline is. The baseline is right here,
04:30
but you can spike above that baseline during a certain
04:33
time period, as long as the average—so the average here is twenty-five percent.
04:37
If your average stays below the baseline, then you're not going to use up all of your CPU credits.
04:43
And if you do use up all your credits, you have two options. By default, you're on Unlimited mode.
04:48
So if you burst above your credit utilization, you keep your EC2 instance using a lot of
04:54
the CPU, you end up spending more money for those CPU credits.
04:58
And we can see that here in the Unlimited mode pricing. You're going to spend
05:02
five cents per virtual CPU hour for a Linux instance.
05:06
So that's in Unlimited mode, and as long as you're not bursting a hundred percent of the time,
05:09
you're not always using the full CPU, so this won't cost you much money.
05:13
The other option, when we go to set up an EC2 instance, you can actually see this.
05:17
Let's say I launch an instance and just select, say, t3.nano.
05:23
If I scroll down to the advanced options, by default, it should select Unlimited.
05:28
But if I select Standard, then I won't spend any extra money if I burst above the baseline too much.
05:35
Instead, what AWS will do is throttle my EC2 instance.
05:38
If it's trying to use too much CPU, it'll stop it from using that for a certain amount
05:42
of time, until I've collected enough credits to then burst beyond that.
05:45
But if you're always utilizing a lot of the CPU and you
05:49
need more than what the baseline is, there are tons of other instance types here.
05:53
We have these general purpose ones you can use, there's compute optimized, memory optimized, accelerated computing.
05:58
There's tons of different instances. So if you're bursting too much, you might want to pick a different instance.
06:03
But for the most part, using a T Series instance with Unlimited mode is not going to cost you too much.
06:09
You're generally not going to be maxing out the CPU all the time.
06:13
And these are affordable and really performant burstable EC2 instances.
06:18
And I have a little example here—I have a t2.micro set up.
06:22
I'm logged in to the EC2 instance right here, and on this side, it's a QR code app.
06:27
We're going to set up this application in the next section. But essentially, if I upload an
06:32
image to this, it's going to create a QR code out of that image on the
06:35
server, and it's going to use up some CPU.
06:38
I can monitor the current CPU utilization using htop, and we'll be able to see that—there we go.
06:44
The CPU is currently at two percent. It'll hover around zero to maybe five percent right now, where it's not really doing anything.
06:50
So right now my EC2 instance is earning credits. But then if I actually use this
06:55
application—so I'm going to drop in an image right here—I can see the CPU utilization go up.
07:00
It went to fifty-one percent while it processed that image and then went straight back down.
07:03
So it's kind of bursting up as it needs to. Every time I have it process a different type
07:09
of image overlay here, the CPU utilization again will burst up a little bit and then come right back down.
07:15
So even for image processing like this, it's always going to burst up, then come back down.
07:20
It's never going to be consistently high. Even if I save the QR code, I have the server
07:24
going through each of these in a loop to process every single image that's needed.
07:28
The CPU is going to go up quite a bit, and it's going to stay there for a little while
07:31
as it processes every image, but then it'll drop back down.
07:34
So in most applications, you're going to have this pattern—yeah, there'll be
07:38
these bursts, but for the most part, you'll be at a low enough
07:42
CPU utilization that the average is going to be okay.
07:45
You're not going to spend too much money, and these are generally pretty good instances to get started.
Cloud Course
Cloud Course
$89.70
$299.00 Lifetime
  • 81+ learning resources
  • 57 lessons and tutorials
  • 15 hands-on deployments
  • 9 quizzes
  • 29 videos (4h 17m 38s)
  • More content coming soon
  • Unlimited lifetime access to all course content
  • Deployment assessment CLI tool
  • Exclusive Discord access
Original Price:$299.00
Discount:-$209.30
Total:$89.70