All articles

AWS Lambda MicroVMs Pricing: What Sandbox Compute Actually Costs (and How the Options Compare)

AWS Lambda MicroVMs pricing, decoded: what a sandbox-compute hour really costs on Lambda vs Cloudflare Sandbox vs self-hosted Firecracker, with current per-unit rates.

Naman Kabra· July 9, 2026· 8 min
createosagentspricingsandboxing
AWS Lambda MicroVMs Pricing: What Sandbox Compute Actually Costs (and How the Options Compare)

The answer (what sandbox compute actually costs)

There is no separate "AWS Lambda MicroVMs" product with its own price sheet — AWS Lambda already runs every function inside a Firecracker microVM, so AWS Lambda MicroVMs pricing is Lambda's pricing: $0.0000166667 per GB-second for x86 plus $0.20 per 1 million requests, with a monthly free tier of 1 million requests and 400,000 GB-seconds (AWS, us-east-2, as of July 2026). That works out to roughly $0.12 for one hour of a 2 GB function's active compute. Cloudflare Sandbox, built on Cloudflare Containers, bills the same hour at about $0.09 of active CPU and memory plus a mandatory $5/month Workers Paid plan. Firecracker itself — the microVM engine under all of this — is free and open source (Apache 2.0); you only pay for the machine you run it on.

Below is the full breakdown, a worked comparison, and where each model wins.

Why this matters (the sandbox is the new cost center)

If you run AI agents, code interpreters, CI runners, or any "execute untrusted code" workload, the sandbox is where your compute bill is generated. Each agent step spins up an isolated environment, does work, and tears down. Multiply that by thousands of concurrent sessions and the per-second math dominates your unit economics.

The confusion in the search results is that people conflate three different things: the isolation technology (Firecracker microVMs), the managed service (Lambda, Cloudflare Sandbox), and the price. The technology is free. The managed services wrap it and charge for convenience. If you want the mechanics of the isolation model rather than the cost, we covered how microVM isolation works and what an AI agent sandbox is separately — this post is strictly about the money.

Firecracker is free — you pay for the metal under it

Firecracker is the open-source virtualization technology AWS built to power Lambda and Fargate. It is "open-sourced under Apache License, version 2.0" and there is no license fee (firecracker-microvm.github.io). It boots a microVM in as little as 125 ms, supports creation rates of up to 150 microVMs per second per host, and runs with under 5 MiB of memory overhead per microVM (Firecracker project docs).

So "Firecracker sandbox pricing" is a category error. Firecracker costs nothing to license. Your cost is the underlying compute — an EC2 instance, a bare-metal host, or a provider that runs Firecracker for you. Self-hosting means you capture the raw hardware price with no per-second software margin, but you own the orchestration, security patching, and idle capacity. That trade is the whole decision.

AWS Lambda MicroVMs pricing, in detail

Lambda's meter has two components (aws.amazon.com/lambda/pricing, as of July 2026):

  • Requests: $0.20 per 1 million requests.
  • Duration: $0.0000166667 per GB-second on x86 (first tier, up to 6 billion GB-seconds/month in us-east-2). Arm/Graviton is roughly 20% cheaper per GB-second.
  • Free tier: 1 million requests and 400,000 GB-seconds every month.

A GB-second is memory allocated multiplied by run time. On Lambda, vCPU is coupled to memory — you do not dial CPU independently; you get proportionally more vCPU as you raise the memory setting (roughly one full vCPU near 1,769 MB).

The structural catch for sandbox workloads: Lambda's maximum execution time is 900 seconds — 15 minutes (docs.aws.amazon.com). A long-running agent session, a browser automation task, or a multi-minute build that exceeds 15 minutes cannot run as a single Lambda invocation. AWS's own guidance is to reach for Step Functions and chain invocations, which adds orchestration cost and complexity. Lambda is superb for short, bursty, stateless steps and a poor fit for durable sandboxes.

Cloudflare Sandbox pricing, in detail

Cloudflare Sandbox SDK pricing is "determined by the underlying Containers platform it's built on" (developers.cloudflare.com/sandbox). The Containers rates (developers.cloudflare.com/containers/pricing, as of July 2026):

  • Base plan: Workers Paid, $5/month, required before any sandbox usage.
  • CPU: $0.000020 per additional vCPU-second, above 375 vCPU-minutes/month included.
  • Memory: $0.0000025 per additional GiB-second, above 25 GiB-hours/month included.
  • Disk: $0.00000007 per additional GB-second, above 200 GB-hours/month included.

Two things make Cloudflare's model distinct. First, containers are billed for every 10 ms they are actively running, and CPU is charged on active usage only — an idle sandbox waiting on a model response or user input stops accruing CPU charges, while memory and disk bill on provisioned size. Second, you also pay for the Workers requests and Durable Objects that front the sandbox. For bursty agent loops that spend most of their wall-clock time idle, active-CPU billing can be materially cheaper than paying for provisioned time.

The worked comparison: one 2 GB / 1-vCPU sandbox hour

Generic pricing guides list rates but never normalize them. Here is the same workload — 2 GB memory, ~1 vCPU, one hour of active compute — priced on each model using the published per-unit rates above.

Model What you pay One active sandbox-hour Structural caveat
AWS Lambda (x86) $0.0000166667 / GB-s + $0.20 / 1M req 7,200 GB-s x $0.0000166667 ≈ $0.12 15-min max per invocation; vCPU coupled to memory
Cloudflare Sandbox $0.00002 / vCPU-s + $0.0000025 / GiB-s active 3,600 vCPU-s ($0.072) + 7,200 GiB-s ($0.018) ≈ $0.09 + $5/mo Workers Paid floor; + Workers/Durable Objects; CPU billed only when active
Self-hosted Firecracker $0 license + underlying host Whatever the host costs, 24/7 You own orchestration, patching, idle capacity

These are worked examples from public per-unit rates, not vendor-quoted invoices — verify against the live pricing pages before you budget. The point is the shape, not the third decimal: at continuous, fully-active use the three converge within cents; the divergence shows up in the caveats. Lambda's 15-minute wall kills durable sessions. Cloudflare's floor and active-CPU billing reward idle-heavy agent loops and punish always-on ones. Self-hosted Firecracker wins on raw price at scale and loses on operational load.

Where CreateOS fits

CreateOS runs on the NodeOps network and is built for agent workloads — the durable, isolated sandboxes that Lambda's 15-minute cap rules out, without you standing up and patching your own Firecracker fleet. You get managed PostgreSQL, MySQL, and GPU compute, 14 framework runtimes, 150+ production-ready templates, and a $0 free tier with no card required. The pitch is not "cheaper per GB-second than AWS" — it is that you skip the orchestration tax of self-hosting Firecracker while keeping durable, stateful sandboxes that serverless functions can't hold. See CreateOS pricing for the current tiers, or talk to our team about high-volume agent-sandbox economics.

Frequently asked questions

Are AWS Lambda MicroVMs a separate product with their own pricing?

No. There is no distinct "Lambda MicroVMs" SKU. Every AWS Lambda function already executes inside a Firecracker microVM, so the microVM pricing is simply Lambda's pricing: $0.20 per 1 million requests plus $0.0000166667 per GB-second on x86, as of July 2026.

How much does AWS Lambda cost per hour of compute?

For a 2 GB function running one hour of active compute on x86, you pay 7,200 GB-seconds at $0.0000166667, or about $0.12, plus request charges of $0.20 per million invocations. Arm/Graviton is roughly 20% cheaper per GB-second. Actual cost scales with the memory you allocate.

Is Firecracker free to use?

Yes. Firecracker is open source under the Apache 2.0 license and carries no license or usage fee. You only pay for the underlying host it runs on — an EC2 instance, bare-metal server, or a managed provider. The microVM engine itself is free.

What does Cloudflare Sandbox pricing cost?

Cloudflare Sandbox bills on the Containers platform: $0.000020 per vCPU-second, $0.0000025 per GiB-second of memory, and $0.00000007 per GB-second of disk, above the included monthly usage, on top of a required $5/month Workers Paid plan. CPU is charged only while the container is actively running.

Why is AWS Lambda a poor fit for long-running agent sandboxes?

Lambda caps a single invocation at 900 seconds — 15 minutes. Durable agent sessions, browser automation, or multi-minute builds that exceed that limit cannot run as one invocation. AWS recommends chaining functions with Step Functions, which adds orchestration cost and complexity that dedicated sandbox platforms avoid.

Which is cheaper for agent sandboxes, Lambda or Cloudflare?

For continuous, fully-active compute the two land within cents of each other per sandbox-hour. Cloudflare's active-CPU-only billing is cheaper for idle-heavy agent loops that wait on model or user input; Lambda avoids Cloudflare's $5/month floor and per-request Workers and Durable Objects charges. The workload's idle ratio decides it.

What is the cheapest way to run microVM sandbox workloads?

Self-hosting Firecracker is cheapest on raw compute because the software is free and you capture the bare hardware price with no per-second margin. The trade is operational: you own orchestration, security patching, and idle capacity. Managed platforms cost more per unit but remove that operational load.

About the author

Naman Kabra is the founder of CreateOS, the execution layer for AI apps and agents built on the NodeOps network. He works on the compute, isolation, and deployment layer that agent workloads run on, and writes about the real economics of running sandboxed code at scale. Connect on LinkedIn.

Next step

Pricing the sandbox layer for a high-volume agent product? Talk to our team about durable-sandbox economics, or start free on the CreateOS pricing tier and benchmark it against your Lambda or Cloudflare bill directly.

Give Us One Stuck Pilot.

We'll have it in governed production before your next board meeting.