On-Demand Instances - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

On-Demand Instances

With On-Demand Instances, you pay for compute capacity by the second with no long-term commitments. 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, with a 60-second minimum. The price per second for a running On-Demand Instance is fixed, and is listed on the .

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

Work 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 on the number of running On-Demand Instances per Amazon account per Region. On-Demand Instance 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.

There are eight On-Demand Instance limits:

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

  • Running On-Demand DL instances

  • Running On-Demand F instances

  • Running On-Demand G and VT instances

  • Running On-Demand High Memory instances

  • Running On-Demand Inf instances

  • Running On-Demand P instances

  • Running On-Demand X instances

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.

You can launch any combination of instance types that meet your changing application needs, as long as the number of vCPUs does not exceed your account limit. 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). For more information, see EC2 On-Demand Instance limits.

Monitor On-Demand Instance limits and usage

You can view and manage your On-Demand Instance limits using the following:

For more information, see Amazon EC2 service quotas in the Amazon EC2 User Guide and Amazon Trusted Advisor.

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 Visualizing your service quotas and setting alarms in the Amazon CloudWatch User Guide.

Calculate 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.

When using the calculator, keep the following in mind: The calculator assumes that you have reached your current limit. The value that you enter for Instance count is the number of instances that you need to launch in addition to what is permitted by your current limit. The calculator adds your current limit to the Instance count to arrive at a new limit.

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 corresponds 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 2,016 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, which is calculated by adding vCPU count and Current limit.

  • 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 corresponds to the number of instances that you specified in Instance count. 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 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.amazonaws.cn/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, you can choose Request on-demand limit increase or Close.

Request a limit increase

Even though Amazon EC2 automatically increases your On-Demand Instance limits based on your usage, you can request a limit increase if necessary. For example, if you intend to launch more instances than your current limit allows, you can request a limit increase.

To request an On-Demand Instance limit increase
  1. Open the Create case, Service limit increase form in the Support Center console at https://console.amazonaws.cn/support/home#/case/create.

    Alternatively, use one of the following:

    • From the Limits Calculator, choose one or more instance types and specify the number of instances, and then choose Request on-demand limit increase.

    • On the Limits page, choose a limit, and then choose Request limit increase.

  2. For Limit type, choose EC2 Instances.

  3. For Region, select the required Region.

  4. For Primary instance type, select the On-Demand Instance limit for which you want to request a limit increase.

  5. For New limit value, enter the total number of vCPUs that you want to run concurrently. To determine the total number of vCPUs that you need, use the value that appears in the New limit column in the vCPU limits calculator, or see Amazon EC2 Instance Types to find the number of vCPUs of each instance type.

  6. (Conditional) You must create a separate limit request for each On-Demand Instance limit. To request an increase for another On-Demand Instance limit, choose Add another request and repeat steps 3 through 5 in this procedure.

  7. For Use case description, enter your use case, and then choose Submit.

For more information about requesting a limit increase, see Amazon EC2 service quotas.

Query the prices of On-Demand Instances

You can use the Price List Service API or the Amazon Price List API to query the prices of On-Demand Instances. For more information, see Using the Amazon Price List API in the Amazon Billing User Guide.