Amazon Elastic Compute Cloud
User Guide for Linux Instances

Working with Burstable Performance Instances

The steps for launching, monitoring, and modifying T3 and T2 instances are similar. The key difference is the default credit specification when they launch:

  • T3 instances launch as unlimited by default.

  • T2 instances launch as standard by default.

Launching a Burstable Performance Instance as Unlimited or Standard

T3 instances launch as unlimited by default. T2 instances launch as standard by default.

You must launch a T3 or a T2 instance using an HVM AMI with ENA and NVMe drivers. For more information, see Release Notes.

You must launch your T3 or T2 instances using an Amazon EBS volume as the root device. For more information, see Amazon EC2 Root Device Volume.

You can launch a T3 or T2 instance as unlimited or standard using the Amazon EC2 console, an AWS SDK, a command line tool, or with an Auto Scaling group. For more information, see Using an Auto Scaling Group to Launch a Burstable Performance Instance as Unlimited.

To launch a burstable performance instance as Unlimited or Standard (Console)

  1. Follow the Launching an Instance Using the Launch Instance Wizard procedure.

  2. On the Choose an Instance Type page, select a T3 or T2 instance type, and choose Next: Configure Instance Details.

  3. Choose a credit specification. The default for T3 is unlimited, and for T2 it is standard.

    1. To launch a T3 instance as standard, on the Configure Instance Details page, for T2/T3 Unlimited, clear Enable.

    2. To launch a T2 instance as unlimited, on the Configure Instance Details page, for T2/T3 Unlimited, select Enable.

  4. Continue as prompted by the wizard. When you've finished reviewing your options on the Review Instance Launch page, choose Launch. For more information, see Launching an Instance Using the Launch Instance Wizard.

To launch a burstable performance instance as Unlimited or Standard (AWS CLI)

  • Use the run-instances command to launch a T3 or T2 instance. Specify the credit specification using the --credit-specification CpuCredits= parameter. Valid credit specifications are unlimited and standard.

    • For T3, if you do not include the --credit-specification parameter, the instance launches as unlimited by default.

    • For T2, if you do not include the --credit-specification parameter, the instance launches as standard by default.

    aws ec2 run-instances --image-id ami-abc12345 --count 1 --instance-type t3.micro --key-name MyKeyPair --credit-specification "CpuCredits=unlimited"

Using an Auto Scaling Group to Launch a Burstable Performance Instance as Unlimited

When T3 and T2 instances are launched or started, they require CPU credits for a good bootstrapping experience. If you use an Auto Scaling group to launch your T3 or T2 instances, we recommend that you configure your T3 or T2 instances as unlimited. If you do, the instances use surplus credits when they are automatically launched or restarted by the Auto Scaling group. Using surplus credits prevents performance restrictions.

Creating a Launch Template

You must use a launch template for launching a T3 or T2 instance as unlimited in an Auto Scaling group. A launch configuration does not support launching a T3 or T2 instance as unlimited.

To create a launch template that launches a T3 or T2 instance as Unlimited (Console)

  1. Follow the Creating a Launch Template procedure.

  2. In Launch template contents, for Instance type, choose a T3 or T2 instance type.

  3. To launch a T3 or T2 instance as unlimited in an Auto Scaling group, in Advanced details, for T2/T3 Unlimited, choose Enable.

    Note

    For T3, if you do not specify a value, the instance launches as unlimited by default.

    For T2, if you do not specify a value, the instance launches as standard by default.

  4. When you've finished defining the launch template parameters, choose Create launch template. For more information, see Creating a Launch Template.

To create a launch template that launches a T3 or T2 instance as Unlimited (AWS CLI)

  • Use the create-launch-template command and specify unlimited as the credit specification.

    • For T3, if you do not include the CreditSpecification={CpuCredits=unlimited} value, the instance launches as unlimited by default.

    • For T2, if you do not include the CreditSpecification={CpuCredits=unlimited} value, the instance launches as standard by default.

    aws ec2 create-launch-template --launch-template-name MyLaunchTemplate --version-description FirstVersion --launch-template-data ImageId=ami-8c1be5f6,InstanceType=t3.medium,CreditSpecification={CpuCredits=unlimited}

Associating an Auto Scaling Group with a Launch Template

To associate the launch template with an Auto Scaling group, create the Auto Scaling group using the launch template, or add the launch template to an existing Auto Scaling group.

To create an Auto Scaling group using a launch template (Console)

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the navigation bar at the top of the screen, select the same Region that you used when you created the launch template.

  3. In the navigation pane, choose Auto Scaling Groups, Create Auto Scaling group.

  4. Choose Launch Template, select your launch template, and then choose Next Step.

  5. Complete the fields for the Auto Scaling group. When you've finished reviewing your configuration settings on the Review page, choose Create Auto Scaling group. For more information, see Creating an Auto Scaling Group Using a Launch Template in the Amazon EC2 Auto Scaling User Guide.

To create an Auto Scaling group using a launch template (AWS CLI)

To add a launch template to an existing Auto Scaling group (Console)

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the navigation bar at the top of the screen, select the same Region that you used when you created the launch template.

  3. In the navigation pane, choose Auto Scaling Groups.

  4. From the Auto Scaling group list, select an Auto Scaling group, and choose Actions, Edit.

  5. On the Details tab, for Launch Template, choose a launch template, and then choose Save.

To add a launch template to an existing Auto Scaling group (AWS CLI)

Viewing the Credit Specification of a Burstable Performance Instance

You can view the credit specification (unlimited or standard) of a running or stopped T3 or T2 instance.

To view the credit specification of a burstable instance (Console)

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the left navigation pane, choose Instances and select the T3 or T2 instance.

  3. Choose Description and view the T2/T3 Unlimited field.

    • If the value is Enabled, then your instance is configured as unlimited.

    • If the value is Disabled, then your instance is configured as standard .

To describe the credit specification of a burstable performanceinstance (AWS CLI)

  • Use the describe-instance-credit-specifications command. If you do not specify one or more instance IDs, all T3 or T2 instances with the credit specification of unlimited are returned, as well as instances that were previously configured as T3 or T2 with the unlimited credit specification. For example, if you resize a T3 instance to an M4 instance, while it is configured as unlimited, Amazon EC2 returns the M4 instance.

    aws ec2 describe-instance-credit-specifications --instance-id i-1234567890abcdef0

    The following is example output:

    { "InstanceCreditSpecifications": [ { "InstanceId": "i-1234567890abcdef0", "CpuCredits": "unlimited" } ] }

Modifying the Credit Specification of a Burstable Performance Instance

You can switch the credit specification of a running or stopped T3 or T2 instance at any time between unlimited and standard.

To modify the credit specification of a burstable performance instance (Console)

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the left navigation pane, choose Instances and select the T3 or T2 instance. To modify the credit specification for several T3 or T2 instances at one time, select all applicable instances.

  3. Choose Actions, Instance Settings, Change T2/T3 Unlimited.

    Note

    The Change T2/T3 Unlimited option is enabled only if you select a T3 or T2 instance.

  4. To change the credit specification to unlimited, choose Enable. To change the credit specification to standard, choose Disable. The current credit specification for the instance appears in parentheses after the instance ID.

To modify the credit specification of a burstable performance instance (AWS CLI)

  • Use the modify-instance-credit-specification command. Specify the instance and its credit specification using the --instance-credit-specification parameter. Valid credit specifications are unlimited and standard.

    aws ec2 modify-instance-credit-specification --region us-east-1 --instance-credit-specification "InstanceId=i-1234567890abcdef0,CpuCredits=unlimited"

    The following is example output:

    { "SuccessfulInstanceCreditSpecifications": [ { "InstanceId": "i- 1234567890abcdef0" } ], "UnsuccessfulInstanceCreditSpecifications": [] }