All Products
Search
Document Center

Elastic Compute Service:Change the instance type of a pay-as-you-go instance

Last Updated:Apr 25, 2025

This topic describes how to change the instance type, including the number of vCPUs and the memory size, of a pay-as-you-go Elastic Compute Service (ECS) instance.

Prerequisites

The instance whose instance type you want to change meets the following requirements:

  • The instance is a pay-as-you-go instance and is not a preemptible instance.

  • The instance is in the Running (Running) or Stopped (Stopped) state.

    Important
    • When you stop a pay-as-you-go instance, we recommend that you set the Stop Mode parameter to Standard Mode. If you select Economical Mode, the computing resources (vCPUs and memory) of the instance are reclaimed. The instance may fail to be restarted due to insufficient computing resources.

    • Service interruptions may occur when you stop instances. We recommend that you stop instances during off-peak hours.

  • Instance type changes are supported by the instance family to which the instance belongs. For more information, see Instance type changes.

Limits and impacts

  • The number of vCPUs and the memory size of an instance can be changed together only by changing the instance type of the instance. You cannot change the number of vCPUs or the memory size separately.

  • You cannot change the instance type of an instance when a configuration change operation, such as changing the instance type or bandwidth, is in progress on the instance.

  • Changing the instance type of an instance changes only the number of vCPUs and memory size on the instance. The operating system, business code, and data of the instance remain unchanged.

Billing

After you change the instance type of a pay-as-you-go instance, the instance is billed based on the new instance type. For more information about billing, see Pay-as-you-go.

Procedure

  1. Go to ECS console - Instance.

  2. In the top navigation bar, select the region and resource group of the resource that you want to manage. 地域

  3. Click the ID of the ECS instance that you want to manage to go to the instance details page. In the upper-right corner of the page, choose All Actions > Upgrade/Downgrade > Change Instance Type.

    Note

    Alibaba Cloud allows you to perform batch operations on the Instance page. You can select multiple ECS instances on the Instance page, and then choose More > Upgrade/Downgrade > Change Instance Type in the lower part of the page. Follow the on-screen instructions to batch change the instance types of the instances.

  4. Select a different instance type.

    Note

    The available instance types are displayed in the New Instance Type drop-down list.

  5. Perform one of the following operations based on the status of the instance:

    • If the instance is in the Stopped state, confirm the estimated cost and click Confirm Change.image

    • If the instance is in the Running state, perform the following steps:

      1. Confirm the estimated cost and click Stop Instances and Proceed.

        image

      2. In the Stop Instance dialog box, configure the Stopped By and Stop Mode parameters and click Confirm.

        Important
        • When you stop an ECS instance, we recommend that you set the Stop Mode parameter to Standard Mode. If you select Economical Mode, the computing resources (vCPUs and memory) of the instance are reclaimed. The instance may fail to be restarted due to insufficient computing resources.

        • Service interruptions may occur when you stop instances. We recommend that you stop instances during off-peak hours.

  6. After the instance type change is complete, click Start Instances and Return. In the Start Instance dialog box, click Confirm.

    image