Lambda Durable Functions Can Now Orchestrate MicroVMs (Preview)
Disclosure: I build PandaStack, a Firecracker microVM sandbox platform, so Lambda MicroVMs is a competitor. I have tried to describe it the way I would describe my own product to a customer: what it does, and where it will bite.
On 25 November 2026 AWS announced a developer preview of an extension that lets Lambda durable functions orchestrate Lambda MicroVMs. A durable function can now launch a MicroVM, hand it a job, wait for the result without paying for Lambda compute, and terminate it. AWS pitches it at "software factories, security scanners" and CI/CD jobs that run untrusted or agent-generated code.
It is preview software on top of a five-month-old primitive, so nobody should put it in production this week. But it is the first time a hyperscaler has shipped a sandbox and a durable workflow engine that know about each other, and the docs are unusually honest about where it leaks money.
What happened
Lambda MicroVMs launched in June 2026. The developer guide describes them as Firecracker-based environments built from a Dockerfile, snapshotted after start-up, launched with run-microvm, reachable on a dedicated HTTPS endpoint, and able to suspend with memory and disk kept. Since launch AWS has added PrivateLink (August), x86 (11 November), customer managed KMS keys (20 November) and, on 20 November, seven more Regions for 21 in total.
The new piece is two Python packages and their TypeScript twins, all published on 20 November and announced five days later:
| Package | Version | Runs where | Job |
|---|---|---|---|
aws-durable-execution-sdk-python-extensions |
0.1.0a1 | In the durable function | microvm, microvm_session, plus agentcore and agentcore_session operations |
aws-durable-execution-sdk-python-compute-worker |
0.0.1a1 | In the MicroVM image | Receives jobs, sends heartbeats, reports results |
@aws/durable-execution-sdk-js-extensions |
0.1.0-alpha.0 | In the durable function | Same operations for TypeScript |
@aws/durable-execution-sdk-js-compute-worker |
0.1.0-alpha.0 | In the MicroVM image | Same worker for Node.js |
Both READMEs open with "This package is experimental. Its API can change in any release." Version numbers come from the PyPI and npm registries on 26 November.
The shape is small. microvm(context, "build", job_input=..., config=...) creates a durable callback, calls RunMicrovm with a client token derived from the callback ID (so a replayed launch returns the same MicroVM), delivers the job, suspends the function until the worker completes the callback, then calls TerminateMicrovm. microvm_session keeps one MicroVM for several jobs so a test step can read files the build step wrote. The same package also runs jobs in Bedrock AgentCore Runtime sessions, which is a hint that AWS sees the durable function, not the sandbox, as the control plane.
What changes for engineers
You get a workflow engine for sandboxes without running one. Most teams I talk to who run agent code in sandboxes have built the same thing: a queue, a state table, a reaper for leaked VMs and a retry loop. Durable functions give you checkpointing, retries, callbacks and up to a year of wall-clock time, and the extension turns "launch, deliver, wait, terminate" into one call. While the MicroVM works the function is suspended, so the docs say no Lambda compute is billed for the wait.
The leak paths are documented, and there are several. This is the part to read twice. The reference says a terminate failure is logged, not raised, and the MicroVM "keeps running, and is billed" until its maximum duration: the job timeout plus 5 minutes, up to 8 hours. The same happens when a map or parallel finishes early with min_successful, when the execution is stopped while waiting, and when a launch attempt times out after quietly creating a VM. Missing lambda:TerminateMicrovm on the role does not fail anything either; every VM simply runs to its limit. The only signal is a log line containing terminate failed for, and the docs tell you to put a metric filter on it.
Delivery is at least once. The worker remembers the last 1,000 finished callback IDs in process memory. A process restart, or more than 1,000 jobs in between, and a duplicate delivery runs the handler again. Build steps that push images or post comments need their own idempotency key.
Deploy through a version or alias, never $LATEST. An execution on $LATEST replays on new code after a deploy, and the docs say a retried launch on new code "can fail and leave a MicroVM running until its maximum duration".
Limits worth writing down. Job timeout from 1 second to 8 hours. Job input at most 6 MiB minus 8 KiB of JSON. Results at most 256 KB. Small jobs (a run hook payload under 4,096 code points) ride inside RunMicrovm and the MicroVM gets the NO_INGRESS network connector; anything larger, any named route and every session job goes over HTTPS with ALL_INGRESS and a short-lived token. Suspending a session needs an idle policy with autoResumeEnabled, or every job after a suspend fails.
Isolation is per MicroVM, permissions are per image. The worker README warns that lambda:SuspendMicrovm on an image lets a MicroVM suspend any other MicroVM of the same image, so use "one image per trust boundary". If you run several tenants' agents from one image with auto-suspend on, a compromised sandbox can freeze its neighbours.
What I ran
I have no AWS account wired to this machine and the task rules forbid AWS commands, so I did not launch a real MicroVM. What I could test is the half that runs inside the VM. I installed the two Python packages from PyPI into a Python 3.12 venv, started the worker on 127.0.0.1:8080 with the Lambda endpoint pointed at a local stub (AWS_ENDPOINT_URL_LAMBDA=http://127.0.0.1:9001, dummy credentials), and fed it the job documents described in the worker reference.
python3.12 -m venv v
v/bin/pip install aws-durable-execution-sdk-python-extensions==0.1.0a1 \
aws-durable-execution-sdk-python-compute-worker==0.0.1a1
AWS_ENDPOINT_URL_LAMBDA=http://127.0.0.1:9001 \
AWS_ACCESS_KEY_ID=localtest AWS_SECRET_ACCESS_KEY=localtest AWS_DEFAULT_REGION=us-east-1 \
v/bin/python3 -I worker.py
| Request to the worker | HTTP answer | What the stub Lambda API received |
|---|---|---|
run hook with a small inline job |
200 | heartbeat, then succeed with {"passed":true} |
The same run hook again |
200 | nothing; worker logged "later run hook ignored" |
HTTP job cb-2 |
202 | heartbeat, succeed |
The same cb-2 again, after it finished |
202 | nothing; "duplicate job ignored" |
| Job whose handler returns 300 KB | 202 | fail with ResultTooLargeError (262,144 byte limit) |
| Job whose handler raises | 202 | fail with RuntimeError: tests failed, no traceback |
| Malformed document | 400 | nothing |
| 7 MiB job body | 400 | nothing |
The callbacks went to /2025-12-01/durable-execution-callbacks/<id>/heartbeat, /succeed and /fail. Everything the docs promise for the worker held: dedupe, fast failure on oversized results instead of a silent timeout, and error messages without file paths. On the function side, MAX_JOB_INPUT_BYTES is 6,283,264, which matches the documented 6 MiB minus 8 KiB. MicrovmConfig accepted a 9-hour timeout and an empty image ARN at construction, so those checks happen when the operation runs, not when your module imports. Catch them in a unit test, not in your first deploy.
What I could not test: launch and resume latency, suspend behaviour, pricing, and whether terminate failures happen often enough to matter. The sandbox creation-time numbers vendors publish rarely survive contact with a real image, so I would not plan around anyone's figure until I have run my own.
What to do this week
- If you already run agent or CI code on Lambda MicroVMs, read the MicroVM operations reference end to end before trying the preview, then prototype one job type in a sandbox account. Add the
terminate failed formetric filter on day one. - Pin exact versions.
0.1.0a1and0.0.1a1are alphas; the next release may rename things. - Make handlers idempotent with your own key, because the worker's dedupe forgets on restart.
- Use one MicroVM image per tenant or trust boundary if you enable auto-suspend.
- Compare it honestly against what you run today. The sandbox providers comparison was refreshed today with Lambda MicroVMs in it, and choosing isolation for agent workloads covers when a microVM is the right boundary at all.
FAQ
Is Lambda MicroVMs orchestration generally available?
No. The durable-function extension is a developer preview announced on 25 November 2026, and AWS says not to use it for production workloads. Lambda MicroVMs itself has been available since June 2026.
Does a durable function pay for Lambda compute while the MicroVM runs?
According to the SDK docs, no: the function invocation ends while the MicroVM works and resumes on the callback. You still pay for the MicroVM, and a MicroVM that is not terminated keeps billing until its maximum duration.
Which languages are supported?
Python and TypeScript, through the Durable Execution SDK extensions and the matching worker libraries. The job document format is the same in both, so a Python function can drive a Node.js worker.
Can I test the worker without AWS?
Partly. I ran the Python worker locally with the Lambda endpoint redirected to a stub and it behaved as documented. The orchestration side needs real RunMicrovm and callback APIs.
Related: the AgentCore Runtime nested virtualization post, running untrusted AI code, serverless in 2026 and the AI agent sandbox providers comparison.
Spot an error or something out of date? Email me and I will fix it and log it on the corrections page.
I'm Ajay Kumar — I build and operate PandaStack, an open-source Firecracker microVM cloud for AI agents, and write about the infrastructure and tooling around it.
Need this kind of infrastructure work? See what I do or email hello@ajayk.sh.
Related
AgentCore Runtime Instances Get KVM and Root: Agents Can Now Run Their Own VMs
AWS added privileged mode on 18 November 2026 and nested virtualization on 19 November to AgentCore Runtime Instances. Agents can run as root, start containers, and open /dev/kvm to boot microVMs or emulators. What the isolation boundary really is, and what to check before turning either on.
6 minNov 25, 2026OpenAI and Cisco Open-Source Shirudo: eBPF Shields for the Patch Gap
On 23 November 2026 OpenAI and Cisco released Shirudo, a BSD-licensed runtime that loads signed eBPF and Java micropatches to block a vulnerable path until the real patch lands. It is pre-release and needs a patched bpf-next kernel and a TPM. What it is, what I checked, and what to do now.
6 minNov 10, 2026OpenAI DevDay 2026: Agents API Gets Computer Use, Codex Moves to the Cloud
OpenAI DevDay on 29 September 2026 added computer use and multi-agent features to the Agents API, cloud Codex, a Decisions API preview, a $500 Pro plan and Bedrock Managed Agents on AWS. What engineers should note.
6 min