Runtime vs AWS Lambda MicroVMs
Runtime runs agent code in Firecracker microVMs, like Lambda MicroVMs. For an agent that mostly waits on a model, it costs 85% less.
The saving: 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $0.64 on Runtime and $4.20 on Lambda MicroVMs. At 100,000 runs a month, that is $63.89 against $420.33, $356 a month saved. Runtime needs no AWS account, IAM role or VPC set up first.
Comparing more than two providers? AWS Lambda MicroVMs alternatives ranks the other providers by the cost of the same job.
Updated
On this page
85% less than AWS Lambda MicroVMs
Compute only, at list rates checked 25 October 2026 (AWS Lambda pricing). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.
Where Runtime is better#
- You pay for the CPU you use. Lambda MicroVMs bill the baseline vCPUs and memory for every second a MicroVM runs, busy or not. Runtime measures the CPU your code actually uses. Time spent waiting on a model costs only a small floor, a twentieth of a vCPU.
- Idle time bills only storage. A Runtime sandbox pauses itself after 300 seconds with nothing happening in it. It keeps its memory and processes. While paused, it pays $0.08 per GB (10⁹ bytes) of saved state a month.
- An uptime promise that pays itself. Paid accounts get 99% API uptime each month. A month below that returns 10% of that month's charges as credit. No claim is needed (Uptime Promise).
- Lower rates on both meters. $0.025 per vCPU-hour, against about $0.0997, and $0.0075 per GiB-hour of memory, against about $0.0132 per GB-hour. With both CPUs busy the whole time, the example job still costs $1.33 on Runtime and $4.20 on Lambda MicroVMs.
- Bigger sandboxes. A paid Runtime sandbox takes up to 16 vCPUs and 64 GiB. Memory is chosen apart from CPU. A MicroVM's baseline tops out at 4 vCPUs and 8 GB, always 2 GB per vCPU.
- Sessions that last. A MicroVM keeps its state for up to 8 hours. A Runtime
sandbox has no time limit. It runs while it works, or stays up idle with
persistent: true. A paused one keeps its memory while you have credit. - Fork a running machine. A Runtime fork copies a sandbox as it is now, memory and processes included, into up to 100 running copies.
- Keys the sandbox never sees. Store an API key once. The sandbox holds a placeholder. Runtime's proxy adds the value only to HTTPS requests to the hosts you name, so a prompt injection has nothing to leak (security).
- Your agent sets itself up. It runs
npx withruntime sandboxes run -- ..., shows you a link, and starts once you approve in the browser. No access key goes into a prompt or a config file. The MCP server reuses the same connection. - Guardrails for agents. Read-only keys, a daily spending limit per key and
maxTotalCostMicroson each sandbox keep an agent inside its budget. Every write takes an idempotency key.
Also included: a code interpreter, network allow and deny lists, custom images, volumes backed up daily, private previews, a Linux desktop, metrics, webhooks, OpenTelemetry export, S3, R2 and GCS bucket mounts, MCP servers from a catalog, identity tokens for AWS and Google Cloud, and free single sign-on. Paid accounts add custom domains, TCP ports, dedicated outbound addresses and WireGuard private networks. See products.
At a glance#
Lambda MicroVMs' figures come from AWS's public pricing and product pages. Last checked 25 October 2026. Rates are for Arm (Graviton) in US East (N. Virginia).
| Runtime | AWS Lambda MicroVMs | |
|---|---|---|
| Isolation | Firecracker microVM, own kernel | Firecracker microVM |
| CPU billing | $0.025 per vCPU-hour of measured CPU, with a small floor | $0.0000276944 per baseline vCPU-second while running |
| Memory billing | $0.0075 per reserved GiB-hour | $0.0000036667 per baseline GB-second while running |
| Sizes | Up to 16 vCPUs and 64 GiB paid, chosen apart | Baseline up to 4 vCPUs and 8 GB, 2 GB per vCPU |
| Session length | No time limit: runs while it works, or persistent |
State kept up to 8 hours |
| Suspend | Files, memory and processes, kept while you have credit | Memory and disk in a snapshot, at $0.08 per GB (10⁹ bytes) a month |
| Free start | 100 free hours of a 1 GB machine in the first 30 days, no card | No free tier for MicroVMs |
| Plan fee | None; prepaid credit from $10 | None; an AWS account |
| Agent sign-in | Browser approval; no key in the agent's config | AWS credentials and IAM |
Cost for the same job#
Take 1,000 runs of a 2 vCPU, 4 GiB sandbox (a 2 vCPU, 4 GB baseline on Lambda MicroVMs). Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds. This is an agent that spends most of its time waiting for a model.
- CPU
- 1,000 × 20 s / 3,600 × $0.025
- $0.14
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0075
- $0.50
- CPU
- 1,000 × 60 s × 2 × $0.0000276944
- $3.32
- Memory
- 1,000 × 60 s × 4 × $0.0000036667
- $0.88
- Saving: 85%, or $3.56 per 1,000 runs.
- Per month: at 100,000 runs, $63.89 on Runtime against $420.33 on Lambda MicroVMs.
- Busier work: with both CPUs busy for the whole minute, $1.33 on Runtime against $4.20 on Lambda. At this size, Runtime is cheaper however busy the sandbox is.
Snapshot storage and its reads and writes, data transfer, taxes and credits are excluded from both. On Runtime, inbound traffic is free. Each account's first 100 GiB out a month is free, then $0.02 per GB (10⁹ bytes). See pricing for Runtime's terms.
How to switch#
Give your coding agent the one instruction in migration. It replaces the MicroVM calls on a branch, tests them on the free usage, and tells you what you save each month. Your old code stays on the main branch until you merge.
A MicroVM image built from a container image maps to a custom image built from the same Dockerfile. A MicroVM's HTTPS endpoint maps to a preview:
TypeScriptimport { Sandbox } from "withruntime";const box = await Sandbox.create();try { await box.spawn("python3 -m http.server 8080"); const preview = await box.previews.create(8080); console.log(preview.urlWithToken);} finally { await box.stop();}When Lambda MicroVMs may fit better#
- Everything else is on AWS. A MicroVM reaches your VPC through the Lambda Network Connector. It is governed by the IAM policies you already run.
- Many regions. AWS runs Lambda in regions worldwide. Runtime runs in one US region.
- Arm code. MicroVMs run on Graviton. Runtime sandboxes are x86-64.
Sources#
Checked 26 October 2026.
Try it on your own work. Sign up, then paste the setup prompt into your coding agent.