Infrastructure
Declare storage, queues, secrets, and compute once — Alien provisions the native cloud service in each customer's environment.
Your customers are on AWS, GCP, and Azure. Without Alien, you'd need separate integrations for each one — different SDKs, different IAM models, different deployment scripts.
With Alien, you declare what you need once. Alien provisions the native cloud service in each customer's environment at deploy time.
import * as alien from "@alienplatform/core"
const data = new alien.Storage("data").build()
const cache = new alien.Kv("cache").build()
const tasks = new alien.Queue("tasks").build()
const secrets = new alien.Vault("credentials").build()
const api = new alien.Function("api")
.code({ type: "source", src: "./api", toolchain: { type: "typescript" } })
.link(data)
.link(cache)
.link(tasks)
.link(secrets)
.build() ┏━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━┓
┃ Storage ┃ ┃ Queue ┃
┗━━━━━┯━━━━━━┛ ┗━━━━━┯━━━━━━┛
│ │
├── AWS ───▶ S3 ├── AWS ───▶ SQS
├── GCP ───▶ Cloud Storage ├── GCP ───▶ Pub/Sub
└── Azure ─▶ Blob Storage └── Azure ─▶ Service BusNo per-provider SDKs. No branching logic. One codebase.
Using resources in your code
In your application code, import the SDK and pass the resource name. The name you use ("data", "cache") matches the name from your alien.ts:
import { storage, kv } from "@alienplatform/sdk"
const data = await storage("data") // S3 on AWS, Cloud Storage on GCP, Blob Storage on Azure
const cache = await kv("cache") // DynamoDB on AWS, Firestore on GCP, Table Storage on Azure
await data.put("report.json", JSON.stringify(report))
const value = await cache.get("user:123")let ctx = AlienContext::init().await?;
let data = ctx.bindings().load_storage("data").await?;
let cache = ctx.bindings().load_kv("cache").await?;
data.put(&"report.json".into(), bytes).await?;
let value = cache.get("user:123").await?;Credentials are injected automatically — IAM roles on AWS, Workload Identity on GCP, Managed Identity on Azure. No config files, no connection strings.
See Resource APIs for the full SDK guide.
Drop to native SDKs anytime
The Alien SDK is a convenience layer, not a lock-in. Every linked resource is also available as an environment variable with the native identifiers:
const binding = JSON.parse(process.env.ALIEN_DATA_BINDING!)
// { service: "s3", bucketName: "acme-data-a1b2c3", region: "us-east-1" }
const s3 = new S3Client({})
await s3.send(new GetObjectCommand({
Bucket: binding.bucketName,
Key: "report.json",
}))Use this when you need platform-specific features like DynamoDB streams, S3 Select, or Pub/Sub ordering keys. Both approaches work in the same app. See Using Native Cloud SDKs.
Works locally
Run alien dev and everything works on your machine — no cloud credentials needed. Alien provides local equivalents for every resource: storage on the filesystem, queues in memory, secrets in an embedded store. Same APIs as production.
alien devSee Local Development.
Resources
| Resource | What it does | AWS | GCP | Azure |
|---|---|---|---|---|
| Function | Serverless compute | Lambda | Cloud Run | Container Apps |
| Storage | Files and objects | S3 | Cloud Storage | Blob Storage |
| KV | Key-value lookups | DynamoDB | Firestore | Table Storage |
| Queue | Async messaging | SQS | Pub/Sub | Service Bus |
| Vault | Secrets | SSM Parameter Store | Secret Manager | Key Vault |
| Artifact Registry | Container images | ECR | Artifact Registry | ACR |