Cloud Servers

AWS Lambda Durable Functions Can Now Orchestrate MicroVMs — Isolated Sandboxes for AI and CI Code

13 min read

AWS Lambda Durable Functions Can Now Orchestrate MicroVMs — Isolated Sandboxes for AI and CI Code

The Short Answer

AWS Lambda durable functions can now treat a MicroVM sandbox as just another step in a long-running workflow. In a developer preview announced on November 25, 2026, and checked today on AWS’s own What’s New page, AWS added an extension to the Durable Execution SDK for TypeScript and Python that lets a durable function launch Lambda MicroVMs, send them work, checkpoint every result, retry failures automatically, and shut the VMs down when the job is done. AWS names the target jobs plainly: software factories, security scanners, and CI/CD pipelines that must run untrusted or AI-generated code in isolation.

For server readers, this is the missing glue between two serverless primitives that were awkward on their own. Durable functions give you a workflow that can run for up to one year with built-in checkpointing and retries, but they execute in Lambda’s normal shared environment. MicroVMs give you VM-level isolation with near-instant launch and resume, but until now you had to build your own queue, polling loop, retry table, and cleanup job around them. The preview joins the two: one durable function can run a single task in a fresh MicroVM, keep a MicroVM session alive across several tasks that share files and memory, or fan work out to many MicroVMs in parallel. The catch is maturity. Every API is marked experimental, AWS says in so many words not to use it for production workloads, and there is no console wizard — you add an extensions package to your function and a worker library to your MicroVM image, and you own the integration. Below: what launched, how the two execution modes differ, what it costs in practice, and who should test it now versus waiting.

What AWS Announced

AWS announced the preview on November 25, 2026, as a new extension for orchestrating Lambda MicroVMs with Lambda durable functions. The extension adds durable operations for running work on MicroVMs and managing their lifecycle, and it is available in all AWS Regions that support both Lambda durable functions and Lambda MicroVMs. It ships for the AWS Durable Execution SDK in TypeScript and Python, with documentation and a sample application on GitHub.

The two building blocks need a one-line refresher, because the value only makes sense together. Lambda durable functions let you write a multi-step application or AI workflow as a single function that checkpoints its progress at each step, retries failed steps automatically, and can wait — for a human approval, a webhook, or a timer — without holding compute open, for executions lasting up to one year. Lambda MicroVMs are a separate serverless compute primitive: each workload gets its own virtual machine with VM-level isolation, near-instant launch and resume from a snapshot, and state preservation between tasks, designed specifically for running user-generated or AI-generated code that should never share a kernel with your own code.

Before this preview, combining them meant writing the orchestration yourself: start a MicroVM, poll for completion, handle token expiry, retry the step if your orchestrator crashed, and remember to terminate stray VMs. That glue code is exactly where sandbox systems leak money and incidents. The extension moves that lifecycle into checkpointed durable operations, so a crash replays from the last completed step instead of starting over — the same resilience story durable functions already tell for ordinary steps, now extended across the VM boundary.

How the Orchestration Works

A durable function treats MicroVM work as a durable operation. The function launches the MicroVM, dispatches the task, and then — per the SDK documentation summarized in third-party coverage checked today — the function invocation can finish while the MicroVM does its work, so you are not billed for Lambda compute time while you wait. When the task reports back, the result is checkpointed. If the task fails or times out, the durable function retries it under the same retry policy as any other step, and it refreshes MicroVM access tokens as needed so a long session does not die on an expired credential. An optional worker library runs inside your MicroVM image to receive tasks, send heartbeats, and report results; without it, you handle task delivery yourself.

Two execution modes cover the realistic patterns. In single-task mode, each job gets a fresh MicroVM: launch, run one isolated task, capture the result, terminate. That is the right shape for a security scanner run, a one-off build step, or executing one agent-generated script where no state should survive. In session mode, the durable function opens a MicroVM session and sends several tasks to the same VM in sequence, sharing one filesystem and memory — the right shape for an agent that writes files in step one and tests them in step two, or a build that compiles, then packages, then signs. Session return values are checkpointed, so they must be JSON-serializable, and per the SDK documentation a session can live for at most eight hours.

Parallel fan-out and event triggers complete the picture. A single durable function can orchestrate multiple MicroVMs in parallel — the SDK pairs the MicroVM helper with its map operation so each item gets its own child context and its own VM — which is how you would scan fifty repositories or build twenty variants at once without fifty separate workflows. And because the orchestrator is just a Lambda function, you can trigger it from Amazon SQS or Amazon EventBridge, so a queue message or a schedule starts the whole checkpointed pipeline. Jobs can also be sent to named routes that the worker inside the image exposes, letting one MicroVM image serve build, test, and scan tasks through different handlers.

Single Task vs Session vs Your Own Server

The practical question is not whether isolation is good — it is which boundary you need for which job. The table below compares the realistic options for running code you do not fully trust.

Plain Lambda function Durable function + MicroVM (preview) Nitro Sandbox on EKS/ECS Dedicated VPS or EC2 instance
Isolation boundary Lambda execution environment Separate VM per task or session Hardware-isolated microVM per pod/task Whole machine per workload
Long-running workflow No (single invocation limits) Yes, checkpointed up to 1 year No (you build the workflow) No (you build everything)
State between steps None Session mode shares files + memory Pod filesystem only Full disk, always on
Retries and recovery You build them Built-in checkpoint + retry Kubernetes restarts, no step replay You build them
Production status GA Developer preview, experimental APIs GA (Nov 9, 2026) GA, always
Best for Trusted short tasks Untrusted/AI code in multi-step jobs Tenant code on shared clusters One long-lived workload

Read the table as a maturity ladder. If your code is trusted and short, a plain function is still the cheapest answer. If many tenants share your Kubernetes nodes, the hardware boundary we covered in AWS Nitro Sandboxes is the production-ready way to isolate each pod today. The durable-plus-MicroVM pattern earns its place one layer up: when the workflow is long, multi-step, and failure-prone — an agent loop, a CI pipeline, a scanning fleet — and each step must run code you would not execute next to your own. A dedicated VPS remains the simplest isolated box for a single always-on workload, but it gives you no checkpointing, no fan-out, and no automatic cleanup; you become the orchestrator.

The same serverless direction shows up elsewhere in this week’s AWS launches. Our coverage of AWS Lambda on GPUs showed Lambda absorbing managed GPU inference without driver management, and DigitalOcean MicroVMs made the pay-per-second, pay-nothing-while-paused sandbox model generally available outside AWS. The pattern is consistent: clouds are racing to make the isolated sandbox a primitive you call, not a fleet you operate. AWS’s contribution here is not the sandbox itself — it is making the sandbox a checkpointed step in a workflow that survives crashes.

Limits That Matter Before You Build on It

Launch-day limits decide whether this fits your system, and a developer preview has more of them than usual. All points below are from AWS’s announcement and the SDK documentation as summarized in coverage checked today; where AWS has not published a number, we say so rather than guessing.

It is a preview, and AWS means it. The extension is a developer preview for the TypeScript and Python Durable Execution SDKs, the package APIs are labelled experimental, and AWS states that preview features may change and should not be used for production workloads. In the TypeScript packages, that means alpha-versioned extensions and a worker library whose recorded operations — the very checkpoints replay depends on — can change between releases. Treat anything you build now as a prototype you may need to rewrite at GA.

You bring two packages and an image. Getting started means adding the extensions package alongside the Durable Execution SDK in your function (the TypeScript version expects core SDK 2.6.0 or later, with the MicroVMs client as an optional peer dependency you install yourself) and baking the matching MicroVM worker library into your MicroVM image. There is no managed image that does this for you yet, so image builds, version pinning, and upgrades are yours to operate.

Heartbeats are not optional in practice. Each job can carry an overall timeout and a heartbeat timeout, and the SDK documentation advises setting a heartbeat on every job — otherwise a job whose MicroVM has died keeps your workflow waiting until the full timeout expires. Failures surface as a MicrovmError type with subclasses for cases like timed-out or failed jobs, which is good design, but you still have to decide retry budgets per step; a checkpointed retry of a non-idempotent build step can double-publish artifacts if you are careless.

Sessions cap at eight hours, and results must serialize. A MicroVM session shares files and memory across tasks, which is powerful for agent workflows, but it cannot outlive eight hours, and every session return value is checkpointed as JSON. Large artifacts belong in S3 with a reference passed through the checkpoint, not in the return value. If your workflow needs a sandbox that lives for days, this is the wrong primitive — use a persistent instance and orchestrate it yourself.

No new price list in the announcement. AWS’s What’s New post does not publish MicroVM orchestration pricing, and we will not invent one. The billing shape described in the SDK documentation is that the durable function does not consume Lambda compute while waiting for the MicroVM, which removes the classic “paying to poll” waste — but you still pay for the underlying Lambda durable execution and MicroVM usage under their respective pricing. Model your cost from those two price pages in your Region before committing a workload; the preview’s economics will only be clear once AWS publishes GA pricing.

Who Should Test It — and Who Should Wait

Test it now if you are building an AI software factory, an agent platform that executes model-written code, a security-scanning service, or a CI system that runs untrusted pull-request code — and you already use, or are evaluating, Lambda durable functions. Start with single-task mode, one job type, heartbeats on, and a hard retry budget. Measure three things: cold-start-to-result latency for your image, checkpoint overhead on session return values, and how cleanly a killed MicroVM replays. That tells you whether the pattern fits before you design around it.

Wait if you need production guarantees today, your team does not run TypeScript or Python durable functions, your jobs need GPUs (this preview says nothing about GPU MicroVMs — managed GPU inference is the separate launch covered above), or your isolation need is already met by a dedicated instance per tenant. For a single long-lived workload, a $5–$10 VPS is still the cheapest isolated Linux box with no preview risk. For shared-cluster tenant isolation in production, Nitro Sandboxes on EKS Auto Mode is the GA path. The durable MicroVM orchestration becomes the default recommendation when AWS removes the preview label and freezes the SDK APIs — until then, it is a well-aimed prototype target, not infrastructure.

Do not confuse the neighbours. Lambda MicroVMs alone are the sandbox; durable functions alone are the workflow; this extension is the join. Step Functions remains the visual, service-integration orchestrator; Fargate and Batch remain the container-job options; hosted sandbox services still sell the finished product — SDK, warm pools, pause/resume — while AWS gives you the primitives inside your own account. The join wins when code and data must stay in your AWS account and the workflow must survive its own failures.

FAQ

What did AWS launch on November 25, 2026?
A developer preview extension for the AWS Durable Execution SDK (TypeScript and Python) that lets Lambda durable functions orchestrate Lambda MicroVMs: launch them, run tasks as checkpointed durable operations, retry failures, refresh tokens, and manage the VM lifecycle, in all Regions supporting both durable functions and MicroVMs.

What is the difference between a single task and a MicroVM session?
A single task runs in a fresh MicroVM that is terminated afterwards — clean isolation per job. A session keeps one MicroVM alive while several tasks run in sequence sharing the same files and memory, for workflows where later steps depend on earlier files. Sessions cap at eight hours per the SDK documentation, and return values must be JSON-serializable.

Is this ready for production?
No. AWS explicitly warns that developer preview features may change and should not be used for production workloads, and the SDK package APIs are marked experimental. Prototype now; wait for GA before depending on it.

What does it cost?
AWS published no new orchestration fee in the announcement. Per the SDK documentation, the durable function does not burn Lambda compute while waiting for the MicroVM to finish. You pay for the underlying durable-function execution and MicroVM usage under their standard pricing — check both price pages for your Region, as we do not publish prices AWS has not stated.

How do I try it?
Add the extensions package to your durable function alongside the Durable Execution SDK (JavaScript/TypeScript or Python), bake the MicroVM worker library into your MicroVM image, and follow the MicroVM orchestration documentation and sample application linked from AWS’s announcement. Feedback goes through issues in the Durable Execution SDK GitHub repositories.

Does this replace a VPS per job?
For many short, untrusted jobs inside a multi-step workflow, that is the point: VM isolation per task without provisioning a machine per job. For one long-lived workload, a dedicated instance or VPS is still simpler and production-proven today.

The Bottom Line

AWS has connected the two halves of serverless sandboxing that developers were gluing together by hand: a workflow that remembers where it stopped, and a virtual machine that forgets nothing it should not share. Durable functions orchestrating MicroVMs turns “run this untrusted code, retry if it fails, clean up afterwards” from a pile of queues and cron jobs into a checkpointed step you declare in code — exactly what AI-agent platforms, security scanners, and CI systems have been asking for. The honest caveat is the preview label: experimental APIs, alpha packages, an eight-hour session cap, and no GA pricing yet. Build the prototype, measure the replay behaviour with your own images, and keep production on GA primitives until AWS freezes the SDK. When that happens, this pattern should become the default way to run code you do not trust on AWS — and the VPS-per-job era for batch sandboxes will be over.

Sources: AWS What’s New, “AWS Lambda now supports orchestrating MicroVMs with Lambda durable functions” (aws.amazon.com, November 25, 2026); AWS Durable Execution SDK extension documentation and sample application on GitHub (TypeScript and Python), as summarized in third-party coverage checked November 27, 2026. AWS has not published GA pricing for this preview; no prices are stated in this article beyond the billing behaviour described in the SDK documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *