---
title: "AWS Lambda: orchestrating MicroVMs with Durable Functions | Daniel Segovia"
description: "AWS previews MicroVM orchestration in Lambda durable functions. Run untrusted or agent code in VM-isolated sandboxes within year-long serverless flows."
url: https://danielsegovia.com/en/architecture/aws-lambda-durable-functions-microvms-orchestration/
lang: en
author: "Daniel Segovia"
published: 2026-11-26T18:01:00.000Z
modified: 2026-11-26T13:04:14.270Z
section: "Architecture"
---

1.  [Home](https://danielsegovia.com/en/)
2.  [Architecture](https://danielsegovia.com/en/architecture/)
3.  AWS Lambda: orchestrating MicroVMs with Durable Functions

# AWS Lambda: orchestrating MicroVMs with Durable Functions

[Architecture](https://danielsegovia.com/en/architecture/) New By [Daniel Segovia](https://danielsegovia.com/en/about/) · November 26, 2026 · 3 min read

AWS previews MicroVM orchestration in Lambda durable functions. Run untrusted or agent code in VM-isolated sandboxes within year-long serverless flows.

In this post

1.  [What happened](#what-happened)
2.  [Why it matters](#why-it-matters)
3.  [Architecture and trade-offs](#architecture-and-trade-offs)
4.  [Monitoring and lifecycle: what to watch](#monitoring-and-lifecycle-what-to-watch)
5.  [What I would do](#what-i-would-do)

AWS released a developer preview extension to orchestrate MicroVMs with Lambda durable functions. The combo lets you run isolated tasks or open sessions where multiple tasks share files and memory, with checkpointing, retries, and lifecycle management for up to one year. It targets user- or agent-generated code in VM-isolated sandboxes, triggered by SQS or EventBridge, without babysitting a whole cluster.

## What happened

The extension adds durable operations to launch work on MicroVMs and manage their lifecycle. You can run single tasks or start a session and send multiple tasks that share state. The durable function coordinates everything: it checkpoints progress, retries failures, and refreshes MicroVM tokens when needed.

One handy detail: there is an optional worker library that runs inside the MicroVM image to receive tasks, send heartbeats, and report results. You can orchestrate multiple MicroVMs in parallel from a single durable function. MicroVMs provide VM-level isolation, near-instant launch/resume, and state preservation across steps.

Availability: developer preview in the Durable Execution SDK for TypeScript and Python. Not for production. It’s in all Regions where Lambda durable functions and Lambda MicroVMs are available.

## Why it matters

This brings stronger isolation into a durable serverless flow. Translation: less custom glue for sandboxes and less infra wrangling to execute untrusted or AI-generated code. If you’ve been eyeing MicroVMs for agents, it’s a natural move. We’ve seen similar ideas elsewhere, like [AI agents on isolated microVMs](https://danielsegovia.com/en/architecture/google-agent-compute-engine-microvms-ai-agents/).

It also aligns with pushing serverless toward longer workloads. I covered when [Lambda doubled its timeout to 30 minutes](https://danielsegovia.com/en/architecture/aws-lambda-max-timeout-30-minutes/). Here we’re talking about orchestrations living up to a year, with tasks and sessions preserving state across steps.

## Architecture and trade-offs

-   Security: VM-level isolation for third-party, user, or agent code. Great for security scanners, software factories, and CI/CD jobs you want sandboxed.
-   Cost: simpler than bringing up full VMs or managing clusters. Watch orchestration costs, session overhead, and state storage. Tag and measure from day one.
-   Operational simplicity: built-in checkpointing, retries, and token handling. Less bespoke orchestration code, more focus on business logic.

Versus containers, the win is VM isolation plus durable-function-managed lifecycle. The potential loss is observability when crossing the function ↔ microVM boundary.

## Monitoring and lifecycle: what to watch

-   Worker heartbeats inside the MicroVM: latency and drops.
-   Retries per task and session; separate environmental from functional failures.
-   MicroVM token refreshes and expirations.
-   Session duration, shared memory/files, and cleanup on close.
-   Image versioning, result traceability, and immutable logs for audit.

If you lean on stateful sessions, set hard limits: session TTL, max artifact size, and garbage-collection policies. For untrusted code, harden images and avoid unpredictable dynamic deps.

## What I would do

-   Run a tight PoC with three cases: user/agent code sandbox, a security scanner, and a CI job that needs privileged tooling.
-   Control policies: max time per task and session, retry budgets, circuit breakers, and consistent aborts.
-   Minimum viable observability: heartbeat metrics, retries, artifact sizes, and per-task/session cost.
-   Security: hardened images, secrets outside the image, and validate outputs before leaving the MicroVM.

If you’re pushing AI on Lambda, this also rhymes with the broader compute push, like when [Lambda added GPU inference](https://danielsegovia.com/en/architecture/aws-lambda-gpu-inference-48-invocations-per-gpu/). The line between serverless and “having VMs” keeps blurring—great for capability, new headaches for platform governance.

My take: it’s worth experimenting. You’ll likely cut platform complexity and raise the isolation bar. But reevaluate monitoring, lifecycle, and costs as if this were a brand-new product in your platform. PS: yes, we now have VMs inside serverless; the tech circle of life.

## Tags

-   [#AWS](https://danielsegovia.com/en/tags/aws/)
-   [#AWS Lambda](https://danielsegovia.com/en/tags/aws-lambda/)
-   [#Serverless](https://danielsegovia.com/en/tags/serverless/)
-   [#MicroVMs](https://danielsegovia.com/en/tags/microvms/)
-   [#Architecture](https://danielsegovia.com/en/tags/architecture/)

[See all tags →](https://danielsegovia.com/en/tags/)

## Related posts

-   [AWS Lambda doubles max timeout to 30 minutes: what changes](https://danielsegovia.com/en/architecture/aws-lambda-max-timeout-30-minutes/)
    
    AWS raises Lambda’s limit to 30 minutes across regions. Great for long jobs, but it shifts concurrency, cost, and orchestration. What to revisit.
    
    3 min read
-   [AWS Lambda adds GPU inference with 48 invocations per GPU](https://danielsegovia.com/en/architecture/aws-lambda-gpu-inference-48-invocations-per-gpu/)
    
    Lambda now supports GPU inference with up to 48 concurrent invocations sharing one model per GPU. This reshapes serverless for AI if you measure well.
    
    3 min read
-   [Cloudflare toggle for AI-agent search, and you pay the bill](https://danielsegovia.com/en/architecture/cloudflare-toggle-ai-agent-search-cost-privacy/)
    
    Cloudflare added a toggle for AI agents to search your site. You pay the query bill. Good DX, new risks to budgets and privacy. Add access controls and limits.
    
    3 min read

## More categories

-   ### [Tutorials](https://danielsegovia.com/en/tutorials/)
    
    [How to create a TypeScript Lambda with AWS SAM](https://danielsegovia.com/en/tutorials/create-typescript-lambda-aws-sam/)
    
    How to create a TypeScript Lambda with AWS SAM. Initialize the project, compile with esbuild, test locally, and deploy to AWS in minutes without pain.
    
    New 5 min read
    
-   ### [News](https://danielsegovia.com/en/news/)
    
    [Huawei speeds chip design; Nvidia slows ASEAN server flows](https://danielsegovia.com/en/news/huawei-speeds-chip-design-nvidia-slows-asean-servers/)
    
    Huawei pushes its homegrown chip-design stack while Nvidia halts AI server shipments in ASEAN. If you bet on one vendor, map risk and ship a plan B.
    
    New 3 min read
    
-   ### [Artificial Intelligence](https://danielsegovia.com/en/artificial-intelligence/)
    
    [OpenAI/Anthropic lock data; China turns to Google and Meta](https://danielsegovia.com/en/artificial-intelligence/openai-anthropic-lock-data-china-google-meta/)
    
    OpenAI and Anthropic restricted data and Chinese players look to Google and Meta. Time to harden pipelines: clear licenses and a data plan B.
    
    New 3 min read
    
-   ### [Security](https://danielsegovia.com/en/security/)
    
    [GoodGuys phishing mimics brands to steal Google/Okta](https://danielsegovia.com/en/security/goodguys-phishing-google-okta-paid-interviews/)
    
    GoodGuys lures with paid interviews to steal corporate Google/Okta creds. Active since October. Priorities: FIDO MFA, phishing drills, and tight SSO control.
    
    New 3 min read
    
-   ### [Architecture](https://danielsegovia.com/en/architecture/)
    
    [Cloudflare toggle for AI-agent search, and you pay the bill](https://danielsegovia.com/en/architecture/cloudflare-toggle-ai-agent-search-cost-privacy/)
    
    Cloudflare added a toggle for AI agents to search your site. You pay the query bill. Good DX, new risks to budgets and privacy. Add access controls and limits.
    
    New 3 min read
    
-   ### [Business](https://danielsegovia.com/en/business/)
    
    [AI infrastructure spend could hit $1T in 2026: now what](https://danielsegovia.com/en/business/ai-infrastructure-spend-2026-1t/)
    
    AI infra investment could reach $1T in 2026. With a $1.8T funding gap through 2030, it’s time to lock budgets, renegotiate contracts and squeeze unit costs.
    
    New 3 min read

---

Sitio: https://danielsegovia.com/ · Índice para agentes: https://danielsegovia.com/llms.txt · Sitemap: https://danielsegovia.com/sitemap.xml
