Amazon Elastic Compute Cloud
User Guide for Linux Instances

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

On-Demand Instances

An On-Demand Instance is an instance that you use on demand. You have full control over its lifecycle—you decide when to launch, stop, hibernate, start, reboot, or terminate it.

There is no long-term commitment required when you purchase On-Demand Instances. You pay only for the seconds that your On-Demand Instances are in the running state. The price per second for a running On-Demand Instance is fixed, and is listed on the On-Demand Pricing page.

We recommend that you use On-Demand Instances for applications with short-term, irregular workloads that cannot be interrupted.

For significant discounts compared to On-Demand Instances, you can use Spot Instances or Reserved Instances.

Working With On-Demand Instances

You can work with On-Demand Instances in the following ways:

If you're new to Amazon EC2, see How to Get Started with Amazon EC2.

On-Demand Instance Limits

There is a limit to the number of running On-Demand Instances per AWS account per Region. You can determine whether your On-Demand Instance limits are count-based or vCPU-based.

Note

Amazon EC2 is transitioning On-Demand Instance limits from count-based instance limits to vCPU-based instance limits. From October 24, 2019, On-Demand Instance limits will be vCPU-based only. For more information, see EC2 On-Demand Instance limits.

Count-Based Instance Limits

With count-based instance limits, your On-Demand Instance limits are managed in terms of the number of instances per instance type that you are running. For more information, see How many instances can I run in Amazon EC2? From October 24, 2019, count-based instance limits for On-Demand Instances are not available.

vCPU-based Instance Limits

With vCPU-based instance limits, your limits are managed in terms of the number of virtual central processing units (vCPUs) that your running On-Demand Instances are using, regardless of the instance type. For more information, see EC2 On-Demand Instance limits.

There are five vCPU-based On-Demand Instance limits, listed in the following table. Each limit specifies the vCPU limit for one or more instance families. For information about the different instance families, generations, and sizes, see Amazon EC2 Instance Types.

On-Demand Instance limit name Default vCPU limit

Running On-Demand Standard (A, C, D, H, I, M, R, T, and Z) instances

1152 vCPUs

Running On-Demand F instances

128 vCPUs

Running On-Demand G instances

128 vCPUs

Running On-Demand P instances

128 vCPUs

Running On-Demand X instances

128 vCPUs

With vCPU limits, you can use your limit in terms of the number of vCPUs required to launch any combination of instance types that meet your changing application needs. For example, with a Standard instance limit of 256 vCPUs, you could launch 32 m5.2xlarge instances (32 x 8 vCPUs) or 16 c5.4xlarge instances (16 x 16 vCPUs), or a combination of any Standard instance types and sizes that total 256 vCPUs. For more information, see EC2 On-Demand Instance limits.

Calculating How Many vCPUs You Need

You can use the vCPU limits calculator to determine the number of vCPUs that you require for your application needs.

The following screenshot shows the vCPU limits calculator.


                    The vCPU limit calculator in the Amazon EC2
                        console.

You can view and use the following controls and information:

  • Instance type – The instance types that you add to the vCPU limits calculator.

  • Instance count – The number of instances that you require for the selected instance type.

  • vCPU count – The number of vCPUs that correspond to the Instance count.

  • Current limit – Your current limit for the limit type to which the instance type belongs. The limit applies to all instance types of the same limit type. For example, in the preceding screenshot, the current limit for m5.2xlarge and c5.4xlarge is 1,920 vCPUs, which is the limit for all the instance types that belong to the All Standard instances limit.

  • New limit – The new limit, in number of vCPUs, that is required to launch the number of instances that you specified.

  • X – Choose the X to remove the row.

  • Add instance type – Choose Add instance type to add another instance type to the calculator.

  • Limits calculation – Displays the current limit, vCPUs needed, and new limit for the limit types.

    • Instance limit name – The limit type for the instance types that you selected.

    • Current limit – The current limit for the limit type.

    • vCPUs needed – The number of vCPUs that correspond to the number of instances that you specified. For the All Standard instances limit type, the vCPUs needed is calculated by adding the values for vCPU count for all the instance types of this limit type.

    • New limit – The new limit is calculated by adding the values for Current limit and vCPUs needed.

    • Options – Choose Request limit increase to request a limit increase for the corresponding limit type.

To calculate the number of required vCPUs

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

  2. From the navigation bar, select a Region.

  3. From the left navigator, choose Limits.

  4. Choose Calculate vCPU limit.

  5. Choose Add instance type, choose the required instance type, and specify the required number of instances. To add more instance types, choose Add instance type again.

  6. View Limits calculation for the required new limit.

  7. When you've finished using the calculator, choose Close.

Requesting a Limit Increase

You can request a limit increase for each On-Demand Instance limit type from the Limits page or the vCPU limits calculator in the Amazon EC2 console. Complete the required fields on the AWS Support Center limit increase form with your use case. For Primary Instance Type, select the limit type that corresponds to the Instance limit name in the vCPU limits calculator. For the new limit value, use the value that appears in the New limit column in the vCPU limits calculator. For more information about requesting a limit increase, see Amazon EC2 Service Limits.

Opt-in Period for vCPU-Based Instance Limits

The opt-in period for the new vCPU-based instance limits lasts until the deadline date, October 24, 2019. During the opt-in period, you can switch between vCPU-based and count-based instance limits. When you opt in, EC2 automatically computes your new limits in vCPUs, giving you access to launch at least the same number of instances (if not more) that you currently can launch.

After October 24, 2019, On-Demand Instance limits will be vCPU-based only; count-based limits will not be available. For more information, see EC2 On-Demand Instance limits.

Note

You opt in or out of vCPU-based instance limits at an AWS account level, so your limit preference applies to all Regions.

To opt in to vCPU-based instance limits

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

  2. From the navigation pane, choose Limits.

  3. To opt in to vCPU instance limits, choose Opt in, enter Opt in in the confirmation window, and then choose Opt in.

    Note

    It can take up to 15 minutes to switch your account from count-based to vCPU-based instance limits, or from vCPU-based to count-based instance limits.

Monitoring On-Demand Instance Limits and Usage

You can view and manage your On-Demand Instance limits from the Limits page in the Amazon EC2 console and from the Amazon EC2 AWS services page in the Service Quotas console. For more information, see Amazon EC2 Service Limits in the Amazon EC2 User Guide for Linux Instances and Viewing a Service Quota in the Service Quotas User Guide.

With Amazon CloudWatch metrics integration, you can monitor EC2 usage against limits. You can also configure alarms to warn about approaching limits. For more information, see Using Amazon CloudWatch Alarms in the Service Quotas User Guide.

Note

If you have opted in to use vCPU-based instance limits, Trusted Advisor currently does not display EC2 On-Demand Instance limits or usage information. From October 24, 2019, Trusted Advisor will display this information. For more information, see Why don't I see a limit amount or any current usage in Trusted Advisor? and Why aren't my CloudWatch event rules and metric alarms for the EC2 On-Demand Instances check working? in the AWS Trusted Advisor FAQs.