CodeSandbox vs AWS Lambda MicroVMs: fixed VM sizes compared
CodeSandbox sells VMs in fixed sizes by the minute; Lambda MicroVMs bill a baseline by the second. The 2-core benchmark: $2.48 against $4.20.
On Runtime the same benchmark costs $0.64, 74% below CodeSandbox and 85% below Lambda MicroVMs. It is 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox (a Nano VM on CodeSandbox) with 20 CPU-seconds of work each.
Estimated compute cost
74% less than CodeSandbox85% less than AWS Lambda MicroVMs
2 vCPUs · 4 GiB · 60 s a run · 20 CPU-seconds busy
Compute only, at list rates checked 23 September 2026 and 25 September 2026 (Together Code Sandbox, AWS Lambda pricing). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.
At a glance
| CodeSandbox SDK | AWS Lambda MicroVMs | Runtime | |
|---|---|---|---|
| Isolation | Firecracker microVM | Firecracker microVM | Firecracker microVM, own kernel |
| Price | Nano (2 cores, 4 GB) $0.1486 an hour in credits | $0.2522 an hour for 2 vCPUs and 4 GB | Measured CPU and reserved memory |
| Billing | By the minute, rounded up | By the second | By the second |
| Largest | 64 cores and 128 GB | A 4 vCPU, 8 GB baseline | 16 vCPUs and 64 GiB, paid |
| Snapshots | Memory snapshot and restore | Suspend with memory, up to 8 hours | Pause and forks keep memory and processes |
| Plan | Build free with 10 VMs; Scale $170 a month | None | None; prepaid credit from $10 |
Sizes, not meters
Both sell a shape by the time it exists. CodeSandbox's Nano is 41% cheaper per hour than Lambda's 2 vCPU, 4 GB baseline, but it rounds each run up to the minute, so a 10-second run pays for sixty. Lambda bills to the second. Runtime bills to the second as well, and only for CPU actually used.
Cost for the same job
2 cores and 4 GB, 60 seconds a run, 20 CPU-seconds of work, 1,000 runs:
TextCodeSandbox Size 1,000 × 60 s / 3,600 × $0.1486 = $2.48Lambda CPU 1,000 × 60 s × 2 × $0.0000276944 = $3.32 Memory 1,000 × 60 s × 4 × $0.0000036667 = $0.88 Total $4.20Runtime 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.64Busy or not makes no difference to either rival: with both CPUs busy for the whole minute it is $2.48 on CodeSandbox and $4.20 on Lambda, and $1.33 on Runtime.
Which one to pick
- CodeSandbox SDK for very large VMs, up to 64 cores, and its browser development tooling.
- Lambda MicroVMs for sandboxes inside AWS.
- Runtime for agent runs of any length billed to the second at the lowest rate.
See Runtime vs CodeSandbox and Runtime vs AWS Lambda MicroVMs.
Sources
CodeSandbox rates checked 23 September 2026; Lambda MicroVMs rates checked 25 September 2026.
Facts on this page were checked on 25 September 2026.