Lambda Durable Functions Can Now Orchestrate MicroVMs (Preview)

Nov 26, 2026 · 7 min · Ajay Kumar

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

  1. 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 for metric filter on day one.
  2. Pin exact versions. 0.1.0a1 and 0.0.1a1 are alphas; the next release may rename things.
  3. Make handlers idempotent with your own key, because the worker's dedupe forgets on restart.
  4. Use one MicroVM image per tenant or trust boundary if you enable auto-suspend.
  5. 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