Skip to content

// diagrams › aws

Lambda durable functions orchestrating MicroVM sandboxes (developer preview)

Lambda durable functions can now orchestrate Lambda MicroVMs in developer preview: checkpointed, retried, parallel sandboxes for AI-generated or untrusted code. What it is, how to design it, and how to draw it.

Opens a copy in the editor, in a new tab, ready to change. No account needed.

Architecture diagram of an agent code sandbox on AWS: an agent or CI job sends a task message to an SQS queue or an event to an EventBridge rule, either of which triggers a Lambda durable function acting as the orchestrator; a code zip and Dockerfile in S3 are built into a MicroVM image snapshot, from which two MicroVMs launch inside a sandbox boundary; the orchestrator runs a checkpointed task in each MicroVM in parallel and receives heartbeats and results back, and one MicroVM reaches an allowed private API in your VPC through a VPC egress connector.

What’s in this diagram

services and parts

  • Agent or CI job
  • Task queue
  • EventBridge rule
  • Durable function (orchestrator)
  • Code zip and Dockerfile
  • MicroVM image (snapshot)
  • MicroVM: task A
  • MicroVM: task B
  • Allowed private API

groups

  • AWS Cloud
  • Region
  • Sandbox: untrusted code runs here
  • Your VPC

Key points

  • Lambda MicroVMs run untrusted or AI-generated code with VM-level isolation, built on Firecracker.
  • A durable function can now launch MicroVMs, run each task as a checkpointed durable operation, retry failures and run several MicroVMs in parallel.
  • The orchestration is a developer preview for the TypeScript and Python Durable Execution SDKs. AWS says not to use it for production workloads.
  • On a diagram, "the agent runs code" becomes three things: a trigger, an orchestrator and a sandbox with its own network rules.

The whole story, step by step: Lambda MicroVMs and durable functions: a sandbox for agent code.

Your diagram is one sentence away.

Start drawing, free

No account needed to start.