# AWS Lambda MicroVMs alternatives: agent sandboxes ranked by cost Runtime is the cheapest Lambda MicroVMs alternative for agents: 85% less for a job that waits on a model, and no AWS setup. **For an agent that waits on a model, Runtime costs 85% less than AWS Lambda MicroVMs.** 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $0.64 on Runtime and $4.20 on Lambda MicroVMs, so 100,000 runs a month save $356. Lambda bills a MicroVM's baseline vCPUs for every second it runs; Runtime bills the CPU time the code used. Lambda rates checked 25 September 2026, the rest checked 23 September 2026. ## Why look past Lambda MicroVMs? Lambda MicroVMs brought Firecracker isolation to AWS in 2026: a MicroVM built from a container image, an HTTPS endpoint in front of it, and suspend after five idle minutes. For agent sandboxes four things push teams to compare: - **The meter runs while the agent thinks.** A MicroVM is billed for its baseline vCPUs and memory every second it runs, at about $0.0997 per vCPU-hour and $0.0132 per GB-hour. Most of an agent's minute is spent waiting for a model, and Lambda charges for two whole vCPUs through it. - **Sessions end at eight hours.** A MicroVM keeps its memory and disk for up to 8 hours. Long agent sessions, overnight jobs and environments kept for a user need something else. - **Small machines.** The largest baseline is 4 vCPUs and 8 GB, with memory fixed at 2 GB per vCPU. A build that wants 16 GiB on 2 vCPUs does not fit. - **An AWS project to stand up.** IAM roles, a MicroVM image and, for private resources, a network connector come before the first command runs. ## Which alternatives are cheapest? The same job everywhere: 1,000 runs of 60 seconds on a 2 vCPU, 4 GiB sandbox, with 20 CPU-seconds of work in each run. Lambda MicroVMs come second to last. [Pricing](/docs/pricing#published-rate-comparison) gives every row's working; plan fees, storage, network and credits are left aside. | # | Provider | Isolation | CPU billed on | 1,000 runs | | --- | ---------------------------------------------------- | ------------------------------------------ | --------------------------------------- | ---------: | | 1 | **Runtime** | Firecracker microVM, own kernel | Measured CPU, with a small floor | **$0.64** | | 2 | Northflank | microVMs for CPU work, gVisor for GPU work | Allocated vCPUs | $1.11 | | 3 | Cloudflare Sandbox (2 vCPU, 6 GiB, 12 GB disk) | A container in its own VM | Active CPU | $1.35 | | 4 | Fly Machines, `performance-2x` with 4 GB | Firecracker microVM | The machine's size while started | $1.44 | | 5 | Prime Sandboxes (5 GiB disk) | microVM, own guest kernel | Allocated vCPUs while running | $1.52 | | 6 | Morph, 2 MCUs | Full virtual machines | The machine's size in MCUs | $1.67 | | 7 | Vercel Sandbox, `iad1` (4 GB) | Firecracker microVM, own kernel | Active CPU | $2.12 | | 8 | Freestyle (32 GiB disk) | Full Linux virtual machines | Allocated vCPUs | $2.25 | | 9 | CodeSandbox SDK, a Nano VM | Firecracker microVM | The VM's size, by the minute rounded up | $2.48 | | 10 | E2B | Firecracker microVM, own kernel | Allocated vCPUs | $2.76 | | 11 | Daytona | Containers by default; VM class separate | Allocated vCPUs | $2.76 | | 12 | Blaxel (4 GB) | Lightweight virtual machines | Included with memory, active time | $2.76 | | 13 | Fly Sprites (4 GB in use) | Firecracker microVM | Measured CPU | $3.31 | | 14 | Modal Sandboxes (1 physical core) | gVisor, a user-space kernel | Requested or used, whichever is higher | $3.97 | | 15 | AWS Lambda MicroVMs, Arm (the one you are replacing) | Firecracker microVM | Baseline vCPUs while running | $4.20 | | 16 | Runloop, a `MEDIUM` devbox | microVM, with a container inside | Allocated CPUs while running | $5.33 | ## Cost for the same job Runtime, Lambda MicroVMs, Fly Machines (Firecracker by the machine) and Vercel Sandbox (Firecracker by active CPU) worked out line by line: ``` Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14 Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50 Total $0.64 Lambda CPU 1,000 × 60 s × 2 × $0.0000276944 = $3.32 Memory 1,000 × 60 s × 4 × $0.0000036667 = $0.88 Total $4.20 Machines Size 1,000 × 60 s / 3,600 × $0.0861 = $1.44 Vercel CPU 1,000 × 20 s / 3,600 × $0.128 = $0.71 Memory 1,000 × 60 s / 3,600 × 4 × $0.0212 = $1.41 Total $2.12 ``` Keep both CPUs busy for the whole minute and the order changes below the top: $1.33 on Runtime, $4.20 on Lambda, $1.44 on Machines and $5.68 on Vercel. Lambda's figure does not move, because it already bills the baseline as if it were always working. Runtime stays the cheapest at both extremes. ## The alternatives, for a Lambda MicroVMs user ### 1. Runtime: Firecracker, billed by use The same isolation, a Firecracker microVM with its own kernel, at $0.025 per vCPU-hour of measured CPU (never under a twentieth of a vCPU) and $0.0075 per reserved GiB-hour. A paid sandbox takes up to 16 vCPUs and 64 GiB with memory chosen apart from CPU, runs as long as its lease is extended, and pauses with its memory for 1 to 365 days. An agent connects with one browser approval, and read-only keys and daily spending limits keep it inside a budget. ### 2. Fly Machines: a machine by the second A `performance-2x` with 4 GB is $0.0861 an hour in `iad`, about a third of Lambda's $0.2522 for the same shape. It stays that price whether busy or idle, in any of 18 regions. ### 3. Prime Sandboxes: microVMs for RL rollouts $0.02 per vCPU-hour and $0.0125 per GiB-hour while running, $1.52 for this job at rates published through 22 December 2026. Accounts start at 1,024 sandboxes at once; snapshots and forks are listed as coming soon. ### 4. Vercel Sandbox: active CPU in 19 regions Firecracker billed on active CPU at $0.128 an hour, $2.12 for the waiting job and $5.68 when busy. It suits apps already deployed on Vercel. ### 5. E2B: the incumbent agent sandbox Firecracker at $0.0504 per allocated vCPU-hour and $0.0162 per GiB-hour, $2.76 here, with pause that keeps memory and a paused sandbox kept without expiry. ### 6. Modal Sandboxes: GPUs beside functions gVisor instead of a microVM, CPU billed on the larger of request and use, $3.97 for this job, with GPUs next to Modal's serverless functions. ## Moving a MicroVM workload A MicroVM image built from a container image becomes a Runtime image built from the same Dockerfile, and the MicroVM's HTTPS endpoint becomes a preview: ```ts check import { readFile } from "node:fs/promises"; import { Runtime } from "withruntime"; const runtime = new Runtime(); await runtime.images.build( { name: "agent-env", dockerfile: await readFile("Dockerfile", "utf8"), contextDir: "." }, { onLog: (line) => console.log(line.text) }, ); await using sbx = await runtime.sandboxes.create({ image: "agent-env", idlePauseSeconds: 300 }); const preview = await sbx.previews.create(8080); console.log(preview.url); ``` `idlePauseSeconds: 300` pauses it after five idle minutes, as a MicroVM suspends, and the next request wakes it with memory intact. The one instruction in [migration](/docs/migrate) has a coding agent port the rest on a branch and test it on the free trial. See also [Runtime vs AWS Lambda MicroVMs](/docs/aws-lambda-microvms-alternative), the [Lambda MicroVMs pricing calculator](/calculators/aws-lambda-microvms-pricing-calculator) and [AWS Lambda vs an agent sandbox](/compare/aws-lambda-vs-agent-sandbox). ## Sources Lambda MicroVMs checked 25 September 2026; the other rival rates checked 23 September 2026. - [AWS Lambda pricing](https://aws.amazon.com/lambda/pricing/), [Lambda MicroVMs](https://aws.amazon.com/lambda/lambda-microvms/) - [Fly.io pricing](https://fly.io/pricing/) - [Vercel Sandbox pricing](https://vercel.com/docs/sandbox/pricing) - [Prime Sandboxes overview](https://docs.primeintellect.ai/sandboxes/overview) - [E2B pricing](https://e2b.dev/pricing), [Modal pricing](https://modal.com/pricing) - Runtime [pricing](/docs/pricing)