T2 instances are designed to provide moderate baseline performance and the capability to burst to significantly higher performance as required by your workload. They are intended for workloads that don't use the full CPU often or consistently, but occasionally need to burst. T2 instances are well suited for general purpose workloads, such as web servers, developer environments, and small databases. For more information about T2 instance pricing and additional hardware details, see Amazon EC2 Instances.
If your account is less than 12 months old, you can use a
for free within certain usage limits. For more information, see
AWS Free Tier.
For more information about the hardware specifications for each Amazon EC2 instance type, see Amazon EC2 Instances.
T2 Instance Requirements
The following are the requirements for T2 instances:
You must launch your T2 instances into a virtual private cloud (VPC); they are not supported on the EC2-Classic platform. Amazon VPC enables you to launch AWS resources into a virtual network that you've defined. You cannot change the instance type of an existing instance in EC2-Classic to a T2 instance type. For more information about EC2-Classic and EC2-VPC, see Supported Platforms For more information about launching a VPC-only instance, see Instance Types Available Only in a VPC.
You must launch a T2 instance using an HVM AMI. For more information, see Linux AMI Virtualization Types.
You must launch your T2 instances using an EBS volume as the root device. For more information, see Amazon EC2 Root Device Volume.
T2 instances are available as On-Demand instances and Reserved Instances, but they are not available as Spot instances, Scheduled Instances, or Dedicated instances. They are also not supported on a Dedicated Host. For more information about these options, see Instance Purchasing Options.
There is a limit on the total number of instances that you can launch in a region, and there are additional limits on some instance types. By default, you can run up to 20 T2 instances simultaneously. If you need more T2 instances, you can request them using the Amazon EC2 Instance Request Form.
Ensure that the T2 instance size you choose passes the minimum memory requirements of your operating system and applications. Operating systems with graphical user interfaces that consume significant memory and CPU resources (for example, Windows) may require a
t2.micro, or larger, instance size for many use cases. As the memory and CPU requirements of your workload grows over time, you can scale to larger T2 instance sizes, or other EC2 instance types.
A CPU Credit provides the performance of a full CPU core for one minute. Traditional Amazon EC2 instance types provide fixed performance, while T2 instances provide a baseline level of CPU performance with the ability to burst above that baseline level. The baseline performance and ability to burst are governed by CPU credits.
What is a CPU credit?
One CPU credit is equal to one vCPU running at 100% utilization for one minute. Other combinations of vCPUs, utilization, and time are also equal to one CPU credit; for example, one vCPU running at 50% utilization for two minutes or two vCPUs running at 25% utilization for two minutes.
How are CPU credits earned?
Each T2 instance starts with a healthy initial CPU credit balance and then continuously (at a millisecond-level resolution) receives a set rate of CPU credits per hour, depending on instance size. The accounting process for whether credits are accumulated or spent also happens at a millisecond-level resolution, so you don't have to worry about overspending CPU credits; a short burst of CPU takes a small fraction of a CPU credit.
When a T2 instance uses fewer CPU resources than its base performance level allows (such as when it is idle), the unused CPU credits (or the difference between what was earned and what was spent) are stored in the credit balance for up to 24 hours, building CPU credits for bursting. When your T2 instance requires more CPU resources than its base performance level allows, it uses credits from the CPU credit balance to burst up to 100% utilization. The more credits your T2 instance has for CPU resources, the more time it can burst beyond its base performance level when more performance is needed.
The following table lists the initial CPU credit allocation received at launch, the rate at which CPU credits are received, the baseline performance level as a percentage of a full core performance, and the maximum earned CPU credit balance that an instance can accrue.
Initial CPU credit*
CPU credits earned per hour
Base performance (CPU utilization)
Maximum earned CPU credit balance***
* There are limits to how many T2 instances will launch or start with the initial CPU credit, which by default is set to 100 launches or starts of any T2 instance per account, per 24-hour period, per region. If you'd like to increase this limit, you can file a customer support limit increase request by using the Amazon EC2 Credit Based Instances Launch Credits Form. If your account does not launch or start more than 100 T2 instances in 24 hours, this limit will not affect you.
*** This maximum does not include the initial CPU credits, which are used
first and do not expire. For example, a
The initial credit balance is designed to provide a good startup experience. The maximum
earned credit balance for an instance is equal to the number of CPU credits received per
hour times 24 hours. For example, a
t2.micro instance earns 6 CPU credits per
hour and can accumulate a maximum earned CPU credit balance of 144 CPU credits.
Do CPU credits expire?
Initial CPU credits do not expire, but they are used first when an instance uses CPU credits. Unused earned credits from a given 5 minute interval expire 24 hours after they are earned, and any expired credits are removed from the CPU credit balance at that time, before any newly earned credits are added. Additionally, the CPU credit balance for an instance does not persist between instance stops and starts; stopping an instance causes it to lose its credit balance entirely, but when it restarts it will receive its initial credit balance again.
For example, if a
t2.small instance had a CPU utilization of 5% for the
hour, it would have used 3 CPU credits (5% of 60 minutes), but it would have earned 12 CPU
credits during the hour, so the difference of 9 CPU credits would be added to the CPU
credit balance. Any CPU credits in the balance that reached their 24 hour expiration date
during that time (which could be as many as 12 credits if the instance was completely idle
24 hours ago) would also be removed from the balance. If the amount of credits expired is
greater than those earned, the credit balance will go down; conversely, if the amount of
credits expired is fewer than those earned, the credit balance will go up.
What happens if I use all of my credits?
If your instance uses all of its CPU credit balance, performance remains at the baseline performance level. If your instance is running low on credits, your instance’s CPU credit consumption (and therefore CPU performance) is gradually lowered to the base performance level over a 15-minute interval, so you will not experience a sharp performance drop-off when your CPU credits are depleted. If your instance consistently uses all of its CPU credit balance, we recommend a larger T2 size or a fixed performance instance type such as M3 or C3.
Monitoring Your CPU Credits
You can see the credit balance for each T2 instance presented in the Amazon EC2 per-instance
metrics of the CloudWatch console. T2 instances have two metrics,
indicates the number of CPU credits used during the measurement period. The
CPUCreditBalance metric indicates the number of unused CPU credits a T2
instance has earned. This balance is depleted during burst time as CPU credits are spent more
quickly than they are earned.
The following table describes the new available CloudWatch metrics. For more information about using these metrics in CloudWatch, see List the Available CloudWatch Metrics for Your Instances.
[T2 instances] The number of CPU credits consumed during the specified period.
This metric identifies the amount of time during which physical CPUs were used for processing instructions by virtual CPUs allocated to the instance.
CPU Credit metrics are available at a 5 minute frequency.
[T2 instances] The number of CPU credits that an instance has accumulated.
This metric determines how long an instance can burst beyond its baseline performance level at a given rate.
CPU Credit metrics are available at a 5 minute frequency.