Resize an instance
Change a stopped instance to another instance type, for more or less CPU and memory.
Last updated 18 November 2026View as Markdown
Replace i-3f9a2c07 with your instance's id. A resize changes CPU and memory only: the disk keeps its size. For more space, attach a volume.
Prerequisites
- Permission for
ec2:ModifyInstanceAttribute. - In the console, also
ec2:DescribeInstancesto open the instance's page (without it the page is not found). - The instance is
stopped. Otherwise the request is refused with400"Instance must be stopped before resizing (current state: …)". - The new type is a type of the catalog (else
400"Invalid or unavailable server type") and is in stock in the instance's zone (else409with the provider's stock message). - A type with more vCPUs needs room for the extra vCPUs in the vCPU quota, else
409"Quota exceeded: …". - The instance runs on a provider machine: an instance on your own hosts, or one whose machine does
not exist yet, is refused with
409"Instance has no backing server yet". - An instance that is a node of a Kubernetes cluster is refused with
409; scale its node group instead.
Resize
- Open the instance, then choose Settings (or Resize in the ⋯ menu).
- Under Server type, choose Resize.
- If the instance is not stopped, the dialog says "Stop … first."; while it is running, choose Stop instance and wait until it is stopped.
- For New type, choose a type. The current type, types of the other architecture and types sold out in the zone are greyed with the reason. The dialog shows the monthly price before and after, as a maximum: instances are billed per started hour, capped at the monthly price.
- Choose Resize instance.
dcloud ec2 instances stop i-3f9a2c07
dcloud ec2 instances wait i-3f9a2c07 --state stopped
dcloud ec2 instances resize i-3f9a2c07 --server-type performance-4
dcloud ec2 instances start i-3f9a2c07POST /ec2/api/instances/i-3f9a2c07/actions/resize
{ "serverType": "performance-4" }Change server_type on the dcloud_instance and run terraform apply. Terraform stops the
instance, resizes it and starts it again.
Result
The answer comes as soon as the change is accepted; the type changes in the background. The API and console leave the instance stopped: start it again when its type has changed. A resize that fails at the provider leaves the instance stopped with the error, starting "Resize:", on its page. Once started, the instance is billed at the new type's hourly price.
Related
Did this page help you?