AWS Lambda now supports orchestrating MicroVMs with Lambda durable functions
AWS introduces a developer preview extension enabling Lambda durable functions to orchestrate MicroVMs, supporting resilient workflows and isolated task execution for untrusted code.
AWS Lambda now supports orchestrating MicroVMs using Lambda durable functions, allowing developers to build resilient, multi-step applications and AI workflows that can run for up to one year. The new extension provides durable operations for running tasks on MicroVMs, including checkpointing, automatic retries, and lifecycle management. This enables the execution of untrusted or agent-generated code in isolated sandboxes, such as software factories, security scanners, or CI/CD jobs. The system supports both individual tasks and shared sessions where multiple tasks operate within the same MicroVM environment.
Lambda MicroVMs serve as a serverless compute primitive offering VM-level isolation, near-instant launch and resume capabilities, and state preservation for running user-generated or AI-generated code. The durable function manages the MicroVM lifecycle, handling task execution, progress checkpointing, and token refreshes as needed. A single durable function can orchestrate multiple MicroVMs in parallel, triggered by event sources like Amazon SQS or Amazon EventBridge.
To implement this, developers can use the AWS Durable Execution SDK for TypeScript and Python, adding the MicroVM extension package to their functions alongside the SDK. An optional worker library must be included in the MicroVM image to receive tasks, send heartbeats, and report results. This setup allows for flexible task distribution and execution within isolated environments.
The MicroVM extension is available as a developer preview in all AWS Regions that support Lambda durable functions and Lambda MicroVMs. Developers are advised not to use preview features for production workloads due to potential changes. Feedback can be shared via the Durable Execution SDK GitHub repository for JavaScript or Python, with additional resources available in the documentation and sample applications.