Frozen and live resources
Every resource in a stack is frozen or live, and you choose which. A frozen resource is created once, at initial setup, the one-time step the customer's admin runs; a live resource is created and updated by Alien on every release, without the admin.
export default new alien.Stack("acme-docs")
.add(documents, "frozen") // the admin creates it at initial setup
.add(policies, "frozen", { remoteAccess: true })
.add(index, "live") // Alien updates it on every release
.add(processor, "live")
.build()Initial setup and ongoing management
A deployment has two phases, and each one runs with different credentials:
Architecture diagram. Left: Customer's admin containing Setup package; Your side containing Alien manager. Right: customer-1's cloud account containing acme-docs deployment containing Frozen containing identity; documents; policies; Live containing index; processor.
- Initial setup. The customer's admin runs CloudFormation, Terraform, Helm, or the setup CLI with their own credentials, once. It creates the frozen resources and a scoped management identity.
- Ongoing management. On every release, Alien uses the management identity to create, update, and delete live resources and roll out code. No admin is involved.
Your choice of frozen or live decides what the management identity is allowed to do:
| Frozen | Live | |
|---|---|---|
| Created by | The customer's admin, at initial setup | Alien, during a release |
| Changed by | Initial setup, run again by the admin | Alien, during a release |
| Alien's management permissions | None to create, change, or delete it. Health checks only, plus narrow operations for a few types | <type>/provision, scoped to this stack's resources |
| What the customer reviews | The resource itself, in the setup template | The permission to manage resources of that type |
A frozen resource asks for less trust: Alien can't delete or reconfigure it. A live resource needs less coordination: you change it with a release, without asking anyone.
Choose by use case
Decide from what the resource holds and how often you expect to change it. In the running example:
documentsis frozen. It holds the customer's files. Their security team reviews the bucket once and wants proof that you can't delete it or open it up.indexis live. It holds data the processor can rebuild. You expect to reconfigure it as the product evolves, without waiting for the customer.policiesis frozen. Your backend writes to it through remote bindings. Its definition rarely changes.processoris live. Compute is always live, because every release ships new code.
The same type can go either way. A cache you rebuild freely is a good live KV. A KV that holds customer state their security review called out is a good frozen one.
Common misconceptions
"Storage is frozen, functions are live." You choose per resource for Storage, KV, Queue, Vault, Postgres, and AI. Only compute is fixed (always live), along with a few types that only initial setup creates, such as Key and ComputeCluster (always frozen).
A Sandbox can be live only on AWS, and on AWS one built from source or from a private base image must be live. The build fails if you pick a lifecycle a type doesn't support.
"Live resources are recreated on every deploy." They aren't. Alien tracks each resource's state and updates it in place, so a live bucket keeps its objects across releases. Alien deletes a live resource only when you remove it from the stack, or when a deployer turns off an optional resource.
"Frozen means the data survives." Data survives in both. Frozen decides who may change the resource and when: only initial setup, run by the customer's admin.
"Frozen limits what my code can do." It doesn't. Your Worker reads and writes a frozen bucket like any other. Runtime access comes from permission profiles, which are separate from the management identity.
"Enabling commands or remote access makes a resource live." It doesn't. Health checks, telemetry, commands, and remote bindings add their own narrow permissions, and the resource keeps its lifecycle.
Changes that need initial setup again
Frozen resources and permission profiles belong to initial setup, so changing them needs the admin's credentials again. A release needs initial setup again when it:
- adds, changes, or removes a frozen resource
- changes any permission profile, including removing a grant or a whole profile
- widens the management identity's permissions with
management: { extend }or{ override }
A ComputeCluster's machine counts, autoscaling bounds, and machine type within the same CPU architecture are the exception: they change without running initial setup again.
What happens to such a release:
- The update stops before it changes anything. The deployment reports
DEPLOYMENT_SETUP_REQUIREDand keeps running the previous release. - The customer's admin reruns initial setup the same way they ran it the first time: update the CloudFormation stack, apply the new Terraform, or rerun the setup command. For a Helm install, upgrade the chart: see Updating a Helm install.
- The deployment continues to the new release. See Follow a deployment.
Some gaps show up only during the rollout, such as a grant the management identity lacks on a resource it's creating. The deployment then reports DEPLOYMENT_RESOURCE_SETUP_REQUIRED and waits instead of retrying.
Rerunning the setup command continues it on its own. After a CloudFormation stack update or a Terraform apply, retry the deployment with alien deployments retry.
Changes to live resources and code roll out with a normal release. Batch frozen changes, and tell customers ahead of time.
Optional frozen resources
A frozen resource can be optional. Gate it with a deployer boolean input, and the answer decides whether it exists:
const config = alien.inputs({
exports: alien.boolean({
providedBy: "deployer",
required: false,
label: "Export bucket",
description: "Create a bucket for document exports.",
default: false,
}),
})
const exports = new alien.Storage("exports").enabled(config.exports).build()
export default new alien.Stack("acme-docs")
.inputs(config)
.add(exports, "frozen")
.build()The admin answers the gate during initial setup, and the answer decides whether the resource exists:
- Yes: initial setup creates the resource.
- No: Alien removes the resource from the stack before it changes anything. It's never created, and the links, grants, and permission entries that reference it are dropped.
At the first initial setup, a gate the admin leaves unanswered takes the input's default.
Initial setup records each answer on the deployment. A gate recorded as no strips the resource from every later release, so those releases roll out without initial setup. When a release adds a gated frozen resource to a deployment that's already set up, Alien records the gate as no. The release rolls out without the resource, and the deployment keeps running without it.
To turn the resource on later, the admin runs initial setup again with the input set to true: for example, the CloudFormation parameter InputExports set to true. That's the only way a no becomes a yes. A yes never becomes a no, because that would delete the resource and its data; create a new deployment instead. An update or alien deployments set-inputs that changes a recorded answer is refused.
Run initial setup again
The admin runs initial setup again the way they ran it the first time. When a release waits for it, the deployment's page in the dashboard and the deployment portal show an Action required notice that names the step, such as Update the CloudFormation stack. View steps lists the exact values for the deployment's setup method.
CloudFormation. Open the existing stack, choose Update stack, then Replace existing template, and paste the template URL from the steps. Keep the current parameter values, except any the steps list.
Terraform. Change the module source and version to the ones the steps show, and set advanced_settings_overlay_json to the value they show. Then run:
terraform init -upgrade
terraform plan
terraform applyCheck the plan before you apply it. If it deletes a bucket, table, or key, cancel it.
alien deploy. Run the same command with the same credentials:
alien deploy --name customer-1-eu --platform awsSetup CLI. The steps save the deployment's token to a setup-token file, then run the setup CLI with --setup-update:
acmectl deploy --name customer-1-eu --setup-update --token-file setup-tokenHelm. Upgrade the chart to the version the steps show, with helm upgrade, Argo CD, Flux, or Terraform. A change that needs new cloud resources, such as a bucket, needs the cloud part of initial setup first. See Updating a Helm install.
Portal setup link. The admin opens the setup link again and selects View steps on the notice. A link that has expired or been revoked no longer opens, so send a new link for the same deployment group.
While it waits, the deployment keeps running its current release. Updates are paused until initial setup runs, and the held release continues once the change is applied. See Held releases.
Next
- How Alien works: initial setup and ongoing management end to end.
- Inputs and secrets: values that differ per deployment.
- Permissions: what your code can access at runtime.
From Terraform
Move the databases, buckets, queues, and keys your Terraform creates in your own cloud into alien.ts, so each customer's deployment gets its own.
Inputs and secrets
Declare the values each deployment needs, say whether you or the customer's admin provides them, and keep customer secrets out of Alien.