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 for which you want to change the instance type must meet the following requirements:
The instance is a pay-as-you-go instance and is not a preemptible instance.
The instance must be in the Running (
Running
) or Stopped (Stopped
) state.ImportantWhen you stop an instance, we recommend that you select Standard for Stop Mode. If you select Economical, computing resources (vCPUs and memory) are released. When you restart the instance, the instance may fail to start because of insufficient inventory.
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 Notes on changing instance types.
Limits
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 the memory size. 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
Go to ECS console - Instance.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Click the ID or name of the target instance to go to the instance details page. In All Operations, select Change Instance Type.
NoteAlibaba Cloud also provides the Batch Operations feature. You can select multiple instances in the instance list, and then select at the bottom of the page. Follow the page instructions to complete the batch operation to change instance types.
Select a target instance type.
NoteThe instance types that can be changed to are displayed on the page.
Perform different operations based on the current state of the instance.
If the instance is in the Stopped state: Confirm the estimated cost and click Confirm Change.
If the instance is in the Running state:
Confirm the estimated cost and click Stop Instance And Continue.
In the Stop Instance dialog box, select a Stop Method and click OK.
ImportantWhen you stop an instance, we recommend that you select Standard for Stop Mode. If you select Economical, computing resources (vCPUs and memory) are released. When you restart the instance, the instance may fail to start because of insufficient inventory.
Service interruptions may occur when you stop instances. We recommend that you stop instances during off-peak hours.
After the configuration change is complete, click Start Instance And Return. In the Start Instance dialog box, click OK.