Resize a deployment
Resizing changes the CPU, memory, or disk of a customer's running deployment. It applies when you build it into your product with your own setup screen, or launch the portal with a Deploy button and show the deployment in your product.
Example UI /Done
Document processing
Settings · Deploy in your cloud
Running at Medium
- Size
- Medium · 2 vCPU · 4 GiB
- Changed
- Jan 20, 14:09
Show it when updateState.active is null and updateState.latest.status is succeeded, or there is no update at all.
- Read back the size. Show the size from your own record of the accepted request, not the label the customer clicked.
- Custom sizes. If the stored values match none of your sizes, say "Custom", not the nearest name.
- Cost. If you show cost, update the estimate now, not when the customer clicked.
- Hidden picker. Hide Change size for deployments the API can't resize. See Resizing.
{
"status": "running",
"stackSettings": {
"compute": { "containers": { "worker": { "cpu": 2, "memory": "4Gi", "volumeSizeGib": 100 } } }
},
"updateState": {
"active": null,
"next": null,
"latest": {
"id": "duop_0vtxpb1sw4sbcdwg2xo37q6",
"status": "succeeded",
"reasons": ["configuration"],
"changedKeys": ["stackSettings.compute"],
"cause": { "kind": "configuration", "at": "2026-01-20T14:02:11Z" },
"completedAt": "2026-01-20T14:09:12Z"
}
}
}Resizing
While a resize runs, show the current size next to the requested one.
Example UI /Resizing
Document processing
Settings · Deploy in your cloud
Resizing to Medium
Small keeps serving until Medium is ready. A single replica restarts to change size, so expect a short interruption.
- Current size
- Small · 1 vCPU · 2 GiB
- Requested
- Medium · 2 vCPU · 4 GiB
- Requested at
- 14:02 by dana@customer-1.example
Show it when updateState.active.status is queued or applying and cause.kind is configuration.
- Two sizes. Show the current size next to the requested one until the operation reports
succeeded. - One change at a time. Disable the picker while a change applies. A newer change replaces one that hasn't applied yet, and the older one reports
superseded. - Short interruption. A single-replica container restarts to change size. Say so before the customer confirms.
- Failed resize.
failedisn't an outage: the old size keeps running. Show the error and the size that still runs. - Who asked.
cause.actornames who requested the change, when Alien knows it.
{
"id": "duop_0vtxpb1sw4sbcdwg2xo37q6",
"status": "applying",
"reasons": ["configuration"],
"changedKeys": ["stackSettings.compute"],
"targetReleaseId": "rel_WbhQgksrawSKIpEN0NAssHX9",
"blocker": null,
"actionRequired": null,
"cause": { "kind": "configuration", "at": "2026-01-20T14:02:11Z" },
"requestedAt": "2026-01-20T14:02:11Z",
"startedAt": "2026-01-20T14:02:40Z"
}Server. Change the size, then follow the update operation it returns.
PATCH /v1/deployments/{id}/compute, then GET /v1/deployments/{id}/update-operations/{operationId}
import { alien } from "./alien"
import { SIZES, type Size } from "./sizes"
export async function resize(deploymentId: string, size: Size) {
const res = await alien.deployments.updateCompute(deploymentId, {
compute: { containers: { worker: { ...SIZES[size] } } },
})
if (res.outcome === "unchanged" || !res.operation) return "unchanged"
// Show "Resizing to <size>" until the operation finishes.
const op = await alien.deployments.getUpdateOperation({
id: deploymentId,
operationId: res.operation.id,
})
return op.status // blocked | queued | applying | succeeded | failed | superseded
}outcome is accepted or unchanged. Send the whole containers section each time.
While the change runs, the same operation shows up as updateState.active on the deployment. Your status poll can follow it without the operation ID.
The deployment must be on AWS, Google Cloud, or Azure and updated by push. Its initial setup must not have started yet, or it must be in one of running, update-pending, updating, update-failed, refresh-failed, initial-setup, initial-setup-failed, provisioning, waiting-for-machines, waiting-for-secrets, or provisioning-failed. Otherwise the call fails with DEPLOYMENT_NOT_READY_FOR_OPERATION.
Hide the size picker for other deployments.
Blocked on the admin
An operation can wait on the customer's admin, for example behind a release that needs initial setup again. It reports blocked, with actionRequired saying what to do:
Example UI /Needs the admin
Document processing
Settings · Deploy in your cloud
Version 13 needs your AWS admin
Version 12 keeps running at Medium. Version 13 adds a permission, so an admin must update the setup in AWS.
Show it when updateState.active.status is blocked. blocker.kind is setup (rerun initial setup), input (a value is missing), or other.
- Still running. The deployment stays
runningat its current size. ReadupdateState, not onlystatus. - Retry doesn't help. Only the admin rerunning initial setup, or the missing input, moves it.
- Picker disabled. Hold further changes until the blocker clears, and say why.
{
"status": "running",
"updateState": {
"active": {
"id": "duop_1x8kq2m4n6p8r0t2v4w6y8z0ab",
"status": "blocked",
"reasons": ["release"],
"blocker": { "kind": "setup", "message": "Permission profile \"processor\" was modified." },
"actionRequired": "Apply the updated setup to continue this update."
},
"next": null,
"latest": null
}
}When the operation reports succeeded, the deployment runs at the new size, as in the example at the top of this page.
Limits
- Disks only grow. Refuse a smaller
volumeSizeGibin your UI. The API refuses it too, withDEPLOYMENT_VOLUME_SIZE_INVALID, and saves nothing. The same error covers sizes outside the provider's range: 1 to 65,536 GiB on AWS, 10 to 65,536 GiB on Google Cloud, and 1 to 32,767 GiB on Azure. - A resize can change machine counts, autoscaling bounds, and on AWS the machine type. Changing pools, placement, or networking needs initial setup to run again, and the call fails with
DEPLOYMENT_COMPUTE_STRUCTURE_IMMUTABLE. - A deployment with no stored pool choices fails with
DEPLOYMENT_COMPUTE_SETUP_REQUIRED. Choose pools during initial setup first. - A single-replica container restarts to change size, so expect a short interruption.
- After you grow a disk through the API, a later CloudFormation stack update that still passes the old
VolumeSizeGibvalue fails. Pass the new value when the admin updates the stack.
Test it
- Resize up, then watch your page show both sizes until
succeeded. Expect a short interruption on a single-replica container. - Try to shrink the disk. Your UI should refuse before it calls the API, and the API answers
DEPLOYMENT_VOLUME_SIZE_INVALIDif it does.
Next
- Sizes and networks: the sizes your product defines
- Updates and connection: blocked updates after initial setup