Supporting resources
Supporting resources are the image registry, build jobs, and cloud identities behind a stack: ArtifactRegistry, Build, and ServiceAccount. Most stacks never declare them, because Alien adds what a stack needs.
You declare one directly when a workload (a Worker, Container, or Daemon) pushes or pulls images itself, starts build jobs in the customer's cloud, or needs an identity with an inline permission set.
| Resource | What it is | AWS | GCP | Azure |
|---|---|---|---|---|
| ArtifactRegistry | Container image registry | ECR | Artifact Registry | Container Registry |
| Build | On-demand build jobs | CodeBuild | Cloud Build | Container Apps jobs |
| ServiceAccount | Workload identity | IAM role | Service account | Managed identity |
All three are always "frozen": the customer's admin creates them during initial setup (see Frozen and live). None has .enabled().
Names in deployment status lists what every resource Alien adds is called in the portal and the dashboard.
ArtifactRegistry
An ArtifactRegistry is a set of container image repositories in the customer's cloud, with shared identity and access control. You provision one per stack, and Alien's build and release flow creates repositories inside it and pushes images into them.
ArtifactRegistry("images") provisioned once: the cloud registry and its pull and push identities
├── images/app-a repositories created as images are built and pushed
├── images/app-b
└── images/app-cDeclare one when your stack builds and runs container images, for example for Container, Daemon, or Build resources, and you want Alien to own the registry, its IAM, and cross-account image distribution.
import * as alien from "@alienplatform/core"
const images = new alien.ArtifactRegistry("images")
.replicationRegions(["us-west-2", "eu-west-1"]) // AWS only
.build()
export default new alien.Stack("acme")
.add(images, "frozen")
.build()The management identity can still create repositories inside a frozen registry and manage access.
Options
| Member | Type | Default | Notes |
|---|---|---|---|
new alien.ArtifactRegistry(id) | string | [A-Za-z0-9-_], up to 64 characters. | |
.replicationRegions(regions) | string[] | [] | AWS only. Replicates images pushed in the home region to these regions, so compute in another region pulls from a nearby endpoint. Lambda needs this when it runs in a different region from the registry. |
ArtifactRegistry has no SDK client, and your code doesn't resolve it at runtime. Alien's release flow and Build resources that link it push images into it.
To push or pull with the cloud's own tools from a workload, grant a permission set:
.permissions({
profiles: { builder: { images: ["artifact-registry/push"] } },
})Registry platforms
The registry is created during initial setup. Repositories are created inside it as images are built and released.
| Platform | Backing service | What initial setup creates | What creating repository my-app does |
|---|---|---|---|
| AWS | Amazon ECR | IAM roles for pull and push. ECR has no registry resource to create. | Creates an ECR repository named {prefix}-my-app with CreateRepository. |
| GCP | Artifact Registry | A Docker repository, plus service accounts for pull and push. | Nothing. Image paths are created on first push. Returns the full image path. |
| Azure | Azure Container Registry | A container registry. | Nothing. ACR creates the repository on first push. Returns the repository URI. |
| Kubernetes | An external registry | Nothing. Supply an external binding to your registry. | |
| Machines | Not provisioned. | ||
| Local | A local registry | Nothing. It connects to the local registry alien dev runs. | Pushes a marker manifest to create the repository. |
A repository is addressed by its routable name: the full, cloud-specific path used for credentials and cross-account grants.
| Platform | Routable name for my-app |
|---|---|
| AWS | {prefix}-my-app. Underscores allowed. |
| GCP | {project}/{repository}/my-app. Each /-separated part uses lowercase letters, digits, dots, underscores, and hyphens, and starts and ends with a letter or digit. Other names fail with INVALID_INPUT instead of being rewritten. |
| Azure | my-app |
| Local | {binding}/my-app, for example artifacts/my-app |
A project id like prj_abc123 works on every cloud.
Registry guarantees
- Short-lived credentials. Generated credentials carry the requested permission, pull or push-and-pull, and expire. On AWS they're scoped to one repository. On GCP they reach the whole Artifact Registry repository, since every name is an image path inside it.
- Isolated cross-account grants. A grant names specific accounts, service accounts, and service types. Granting pull access to one account doesn't affect any other.
- No widened grants on GCP. Artifact Registry has no IAM below a repository, so a grant on one name would reach every name's images. Alien refuses such a grant with
OPERATION_NOT_SUPPORTEDinstead of widening it.- Only the registry's own pull and push service accounts can be named.
- To give tenants separate access, use a separate ArtifactRegistry per tenant.
- Old images stay readable after a rename. On AWS, when the registry's repository prefix changes, images released under the old prefix stay readable and keep their cross-account grants. Pushes to the old prefix are refused.
Cross-account access
On AWS and GCP, Alien can let other cloud accounts pull images from the registry, for example when compute in a customer's account runs images released from yours.
| Platform | How access is granted |
|---|---|
| AWS | ECR repository policies naming AWS account ids and IAM role ARNs. Lambda workers in another account also need permissions on their execution role. |
| GCP | IAM bindings on the Artifact Registry repository, naming project numbers and service account emails. Covers every name in the repository. |
| Azure | Not supported through Alien. Cross-subscription access isn't exposed. |
Grants stay cloud-specific because AWS and GCP use different identity models, and a single abstraction would lose one side.
Replication is AWS-only for a similar reason. ECR has native cross-region replication; GCP offers multi-region repositories through a different mechanism.
Registry limits
| Limit | Value | Notes |
|---|---|---|
| Resource id | [A-Za-z0-9-_], up to 64 characters | |
| Credential lifetime, AWS | Up to 12 hours | From GetAuthorizationToken, a base64 username and password pair. Longer requests are capped. |
| Credential lifetime, GCP | Up to 1 hour | A short-lived access token from service account impersonation. Longer requests are capped. |
| Credential lifetime, Azure | About 5 minutes | A stateless exchange: Entra ID token, ACR refresh token, scoped access token. No persistent tokens or scope maps are created. |
| Images per repository | 100,000 on ECR | An ECR quota. GCP and Azure have higher or no documented limits. |
| Cross-account pull | AWS and GCP | Not on Azure. On GCP a grant covers the whole repository. |
| Replication | AWS only |
Per-cloud details:
- AWS. Pulls aren't throttled per repository for authenticated requests.
- GCP. No presigned URLs: layers are fetched through the registry API with a bearer token. Alien uses only the Docker format.
- Azure. The tier sets limits:
- Basic: 10 GB, 10 writes a minute, 1,000 reads a minute. Alien's direct provisioning creates Basic.
- Standard: 100 GB, 100 writes, 3,000 reads.
- Premium: 500 GB, 2,000 writes, 10,000 reads. The Terraform setup template creates Premium with admin access turned off.
- Local. A local registry with basic auth and no cross-account access, for development and tests.
Pricing
The customer pays the cloud provider for the registry on their own cloud bill. Alien lists ArtifactRegistry as a free resource on Pricing.
Prices are list prices as of October 2026 in AWS us-east-1, GCP us-central1, and Azure East US.
| Cloud | Service | Price | Notes |
|---|---|---|---|
| AWS | ECR | $0.10 per GB a month | No base fee. |
| GCP | Artifact Registry | $0.10 per GB a month | First 0.5 GB free. |
| Azure | ACR Basic | $0.1666 a day, about $5.07 a month | 10 GB included, then $0.10 per GB. |
| Azure | ACR Standard | $0.6666 a day, about $20.28 a month | 100 GB included, then $0.10 per GB. |
| Azure | ACR Premium | $1.6666 a day, about $50.69 a month | 500 GB included, then $0.10 per GB. Geo-replication available. |
For 10 GB of images a month:
| Cloud | Monthly cost |
|---|---|
| AWS ECR | $1.00 |
| GCP Artifact Registry | $0.95 (9.5 GB billed after the free 0.5 GB) |
| Azure ACR Basic | $5.07 flat |
| Azure ACR Premium | $50.69 flat |
- Pulls within the same region are usually free or close to it. Cross-region and internet egress follow standard data transfer pricing.
- On AWS, replicated images are billed as storage in each region.
- ACR Basic's 10 writes a minute can slow down release pipelines.
Sources: Amazon ECR pricing, Artifact Registry pricing, Azure Container Registry pricing.
Registry permissions
| Set | Grants |
|---|---|
artifact-registry/pull | Pulling images and reading repository metadata. |
artifact-registry/push | Pushing and pulling images. |
artifact-registry/provision | Creating the registry during initial setup. |
artifact-registry/management, artifact-registry/heartbeat | Used by the management identity to manage repositories and access, and to check health. |
Build
A Build resource is a build project in the customer's cloud that runs a bash script in a container image on demand, for compiling, testing, or packaging code.
import * as alien from "@alienplatform/core"
const images = new alien.ArtifactRegistry("images").build()
const builder = new alien.Build("builder")
.computeType("large")
.environment({ TARGET: "release" })
.link(images)
.permissions("builder")
.build()
export default new alien.Stack("acme")
.add(images, "frozen")
.add(builder, "frozen")
.permissions({
profiles: { builder: { images: ["artifact-registry/push"] } },
})
.build()Build options
| Method | Type | Default | Notes |
|---|---|---|---|
.permissions(profile) | string | required | Permission profile the build runs with. |
.computeType(type) | "small" | "medium" | "large" | "x-large" | "medium" | Each cloud maps it to its own sizes. See Compute types. |
.environment(vars) | Record<string, string> | {} | Variables for every run. |
.link(resource) | Resource | none | Repeatable. |
Start a build
Build has no TypeScript or Python binding. Rust workloads start runs through the alien-bindings build binding:
| Method | Notes |
|---|---|
start_build(config) | config has image, script (bash), environment, timeout_seconds, compute_type, and optional log monitoring. Returns a BuildExecution. |
get_build_status(build_id) | BuildExecution with status QUEUED, RUNNING, SUCCEEDED, FAILED, CANCELLED, or TIMED_OUT. |
stop_build(build_id) | Cancels a run. |
The resource output identifier is the provider's project id (ARN on AWS, project id on GCP, resource id on Azure). See the Rust SDK.
Build platforms
| Platform | Provisions |
|---|---|
| AWS | CodeBuild project |
| GCP | Cloud Build |
| Azure | Container Apps jobs |
| Kubernetes | Kubernetes Jobs |
| Machines | Not supported |
| Local | Not supported |
Compute types
computeType | AWS CodeBuild | GCP Cloud Build | Azure Container Apps job |
|---|---|---|---|
small | BUILD_GENERAL1_SMALL | E2_MEDIUM | 0.25 vCPU, 0.5 GiB |
medium | BUILD_GENERAL1_MEDIUM | E2_MEDIUM | 0.5 vCPU, 1 GiB |
large | BUILD_GENERAL1_LARGE | E2_HIGHCPU_8 | 1 vCPU, 2 GiB |
x-large | BUILD_GENERAL1_2XLARGE | E2_HIGHCPU_32 | 2 vCPU, 4 GiB |
On AWS the CodeBuild project takes the compute type from .computeType(). On GCP and Azure each run applies compute_type from its config.
Runs
- Script. Each run executes
scriptwith bash. Alien wraps it to forward logs to the optionalmonitoringOTLP endpoint (path/v1/logsby default, TLS on and verified by default). - Image. On GCP, Azure, and Kubernetes the run uses
imagefrom the run's config. On AWS the CodeBuild project uses the Alien builder image (ghcr.io/alienplatform/alien-builder) set at initial setup. - Timeout.
timeout_secondsbounds the run on GCP, Azure (replica timeout), and Kubernetes (activeDeadlineSeconds). On AWS the project's CodeBuild timeout applies. - Retries. Kubernetes doesn't retry a failed run (
backoffLimit: 0). Azure allows one replica retry. - Logs. On AWS, logs go to CloudWatch Logs. On GCP, to Cloud Logging only.
Build permissions
| Set | Grants |
|---|---|
build/execute | Starting, stopping, and monitoring runs. |
build/logs-and-artifacts | Lets the build write logs and build reports. |
build/provision, build/management, build/heartbeat | Used by initial setup and the management identity. |
ServiceAccount
A ServiceAccount is a non-human cloud identity that workloads run as: an IAM role, a GCP service account, or an Azure managed identity.
You rarely declare one. Alien creates a ServiceAccount for each permission profile in the stack, and every workload with .permissions("<profile>") runs as it:
import * as alien from "@alienplatform/core"
const files = new alien.Storage("files").build()
const api = new alien.Worker("api")
.code({ type: "source", src: "./api", toolchain: { type: "typescript" } })
.permissions("execution")
.build()
// Alien adds a ServiceAccount for the "execution" profile
export default new alien.Stack("acme")
.add(files, "frozen")
.add(api, "live")
.permissions({ profiles: { execution: { files: ["storage/data-read"] } } })
.build()To declare one directly with an inline permission set:
const reader = new alien.ServiceAccount("reader")
.stackPermissionSet({
id: "custom/read-objects",
description: "Read objects from every bucket in the stack",
platforms: {
aws: [{ grant: { actions: ["s3:GetObject"] }, binding: { stack: { resources: ["*"] } } }],
},
})
.build()ServiceAccount options
| Method | Type | Default | Notes |
|---|---|---|---|
.stackPermissionSet(set) | PermissionSet | none | Repeatable. Inline sets only, with id, description, and platforms. Built-in set names go in permission profiles instead. |
ServiceAccount has no SDK binding. Workloads get its credentials automatically from the platform.
ServiceAccount platforms
| Platform | Provisions |
|---|---|
| AWS | IAM role |
| GCP | Service account |
| Azure | User-assigned managed identity |
| Kubernetes | Nothing. Uses ServiceAccounts created by the Helm chart. |
| Machines | Not supported |
| Local | Local identity record |
Outputs
| Field | AWS | GCP | Azure |
|---|---|---|---|
identity | Role ARN | Service account email | Managed identity client id |
resourceId | Role name | Service account unique id | Managed identity resource id |
Identity behavior
- One identity per profile. A profile named
executionbecomes a ServiceAccount with idexecution-sa. The cloud identity is named after the stack prefix and that id. - Stack-wide grants. Permission sets under
"*"in the profile attach to the identity directly. On AWS they're an inline policy on the role. - Resource-scoped grants. Sets scoped to one resource are applied by that resource when it's created, so the grant names the exact bucket, queue, or secret.
- Grants survive their profile. A frozen ServiceAccount keeps the grants captured during initial setup, even after the profile that produced them is removed from
alien.ts. Changing them takes the customer's admin running initial setup again. - Impersonation.
service-account/impersonatelets one identity act as another. On AWS it grantssts:AssumeRoleon roles with the stack prefix, and the target role's trust policy lists the callers.
| Limit | Value |
|---|---|
| Id | [A-Za-z0-9-_], up to 64 characters. Immutable. |
| GCP service account id | Up to 30 characters, a GCP limit |
| Lifecycle | Frozen only |
ServiceAccount permissions
| Set | Grants |
|---|---|
service-account/impersonate | Acting as this identity from another workload. |
service-account/provision | Creating roles, service accounts, and managed identities. Used by initial setup. |
service-account/management, service-account/heartbeat | Used by the management identity. |
Names in deployment status
The deployment portal and the dashboard show each resource Alien adds under a built-in name, next to its ID. A stack gets only the ones it needs, each in the category for its type (see Categories).
AWS
| Name | ID | Category |
|---|---|---|
| Network | default-network | Networking and access |
| Management identity | management | Networking and access |
| Service account (profile) | <profile>-sa | Networking and access |
| Remote resource access | access | Networking and access |
| Compute cluster | compute | Compute |
| Sandbox egress gateway | sandbox-egress-gateway | Compute |
| Application secrets | secrets | Secrets and keys |
| Deployer secrets | deployer-secrets | Secrets and keys |
Google Cloud
| Name | ID | Category |
|---|---|---|
| Network | default-network | Networking and access |
| Management identity | management | Networking and access |
| Service account (profile) | <profile>-sa | Networking and access |
| Remote resource access | access | Networking and access |
| Service API, such as Cloud Run API | enable-<service>, such as enable-cloud-run | Networking and access |
| Agent Platform engine (sandbox) | <sandbox>-engine | Networking and access |
| Compute cluster | compute | Compute |
| Application secrets | secrets | Secrets and keys |
| Deployer secrets | deployer-secrets | Secrets and keys |
Google Cloud APIs appear only when the stack needs them: Artifact Registry API, Cloud Build API, Cloud Firestore API, Cloud KMS API, Cloud Quotas API, Cloud Resource Manager API, Cloud Run API, Cloud SQL Admin API, Cloud Storage API, Compute Engine API, IAM Service Account Credentials API, Identity and Access Management (IAM) API, Kubernetes Engine API, Pub/Sub API, Secret Manager API, Security Token Service API, and Vertex AI API.
Azure
| Name | ID | Category |
|---|---|---|
| Network | default-network | Networking and access |
| Resource group | default-resource-group | Networking and access |
| Storage account | default-storage-account | Networking and access |
| Container Apps environment | default-container-env | Networking and access |
| Service Bus namespace | default-service-bus-namespace | Networking and access |
| Management identity | management | Networking and access |
| Service account (profile) | <profile>-sa | Networking and access |
| Remote resource access | access | Networking and access |
| Microsoft.Service provider, such as Microsoft.App provider | enable-<service>, such as enable-app | Networking and access |
| Compute cluster | compute | Compute |
| Application secrets | secrets | Secrets and keys |
| Deployer secrets | deployer-secrets | Secrets and keys |
Provider registrations appear only when the stack needs them: Microsoft.App, Microsoft.ContainerRegistry, Microsoft.ContainerService, Microsoft.DBforPostgreSQL, Microsoft.EventGrid, Microsoft.KeyVault, Microsoft.Network, Microsoft.ServiceBus, and Microsoft.Storage.
Kubernetes
| Name | ID | Category |
|---|---|---|
| Kubernetes cluster | kubernetes | Networking and access |
| Sandbox egress gateway | sandbox-egress-gateway | Compute |
Kubernetes on a cloud can also get a Network. See Network.
Your machines
| Name | ID | Category |
|---|---|---|
| Compute cluster | compute | Compute |
Next
- Permissions: profiles and the identities they become
- Releases: how images are built and published
- Permission sets: every built-in set by resource