# Modal vs AWS Lambda MicroVMs: serverless sandboxes compared Runtime Cloud (withruntime.com) is 84% cheaper than either. Modal uses gVisor. Lambda MicroVMs use Firecracker. ## Which is better, Modal or AWS Lambda MicroVMs? It depends on which platform the rest of your system lives on. For agents that mostly wait on a model, Runtime has the lowest bill: $0.64 for 1,000 one-minute runs, against $3.97 on Modal and $4.20 on Lambda MicroVMs. Runtime runs on Firecracker, has no time limit, and pauses keep memory. Pick Modal when sandboxes sit beside GPU functions and scheduled jobs. Pick Lambda MicroVMs when the system is on AWS and must stay inside your VPC and IAM. ## At a glance | | Modal Sandboxes | AWS Lambda MicroVMs | Runtime | | --------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | -------------------------------------------------------------- | | Isolation | gVisor, a user-space kernel | Firecracker microVM | Firecracker microVM, own kernel | | CPU | $0.1419 per physical core-hour (2 vCPUs), request or use | $0.0997 per baseline vCPU-hour | $0.025 per vCPU-hour of measured CPU, with a small floor | | Memory | $0.0240 per GiB-hour, request or use | $0.0132 per GB-hour | $0.0075 per reserved GiB-hour | | Lifetime | Up to 24 hours; snapshots carry state beyond | State kept up to 8 hours | No time limit: runs while it works, or `persistent` | | Plan | Starter $0 with $30 a month; Team $250 a month | None; an AWS account | None; prepaid credit from $10 | | GPUs | Yes, beside Modal functions | No | No | ## A shared lineage, different kernels Modal and Lambda both grew sandboxes out of a functions platform, so both fit teams already deploying there. The difference that matters for untrusted agent code is the boundary. gVisor intercepts system calls in a user-space kernel. A Lambda MicroVM, like a Runtime sandbox, runs its own guest kernel under a hypervisor. See [gVisor vs Firecracker](/compare/firecracker-vs-gvisor). ## Cost for the same job 1,000 runs, 60 seconds each, 20 CPU-seconds of work, 2 vCPU and 4 GiB (one physical core on Modal, a 4 GB baseline on Lambda): ``` Modal CPU 1,000 × 60 s × 1 core × $0.00003942 = $2.37 Memory 1,000 × 60 s × 4 × $0.00000667 = $1.60 Total $3.97 Lambda CPU 1,000 × 60 s × 2 × $0.0000276944 = $3.32 Memory 1,000 × 60 s × 4 × $0.0000036667 = $0.88 Total $4.20 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 ``` For 100,000 runs a month: $396.60 on Modal, $420.33 on Lambda, and $63.89 on Runtime. With both CPUs busy for the whole minute, the job still costs $3.97 on Modal and $4.20 on Lambda, and $1.33 on Runtime. ## Which one to pick - **Modal** when sandboxes sit beside GPU functions and scheduled jobs. - **Lambda MicroVMs** when the rest of the system is on AWS and must stay inside your VPC and IAM. - **Runtime** for Firecracker, which costs over 80% below either bill. It runs sandboxes up to 16 vCPUs and 64 GiB, and pauses keep memory while you have credit. More: [Runtime vs Modal](/docs/modal-sandbox-alternative), [Runtime vs AWS Lambda MicroVMs](/docs/aws-lambda-microvms-alternative). ## Runtime Cloud Runtime runs the same work for 84% less than Modal and 85% less than Lambda MicroVMs. Both rivals come from serverless functions, and both bill a sandbox for what it reserved: Modal bills the larger of its request and its use, and Lambda bills its baseline. Runtime measures CPU. The benchmark, 1,000 runs of a 2 vCPU, 4 GiB sandbox with 20 CPU-seconds of work, costs $0.64 there. There is no plan fee. Start free with `npx withruntime login`. The [migration guide](/docs/migrate) covers moving Modal Sandboxes code. ## Sources Modal rates checked 25 October 2026. Lambda rates checked 25 October 2026. - [Modal pricing](https://modal.com/pricing), [Modal resources and billing](https://modal.com/docs/guide/resources) - [AWS Lambda pricing](https://aws.amazon.com/lambda/pricing/), [Lambda MicroVMs](https://aws.amazon.com/lambda/lambda-microvms/) - Runtime [pricing](/docs/pricing) Facts on this page were checked on 26 October 2026.