AWS Lambda Introduces Orchestration of MicroVMs with Durable Functions for Secure, Long-Running Workflows
Home/Blog/Tech/AWS Lambda Introduces Orchestration of MicroVMs with Durable Functions for Secure, Long-Running Workflows
Cloud platforms, Software engineering, AI and modelsConfirmed

AWS Lambda Introduces Orchestration of MicroVMs with Durable Functions for Secure, Long-Running Workflows

AWS Lambda now supports orchestrating MicroVMs with durable functions, offering a powerful new way to build secure, resilient, and long-running applications, including those involving untrusted or AI-generated code.

Confirmed facts

AWS has announced a developer preview of a new extension designed for orchestrating Lambda MicroVMs with Lambda durable functions. This extension introduces durable operations specifically for executing work on MicroVMs and managing their lifecycle.

The new operations enable developers to construct applications such as software factories, security scanners, and CI/CD jobs. These applications are designed to run untrusted or agent-generated code within isolated sandboxes.

Lambda durable functions facilitate the creation of resilient, multi-step applications and AI workflows capable of running for up to one year. These durable functions incorporate built-in checkpointing and automatic retries.

Lambda MicroVMs are a serverless compute primitive that offer VM-level isolation, near-instant launch and resume capabilities, and state preservation. They are designed for executing user-generated or AI-generated code.

With this new launch, developers can either run individual tasks within a MicroVM or initiate a MicroVM session where tasks share the same files and memory. The durable function assumes responsibility for managing the MicroVM lifecycle, executing each task as a durable operation. This includes checkpointing progress, retrying failed tasks, and refreshing MicroVM tokens as required.

A single durable function has the capacity to orchestrate multiple MicroVMs concurrently. These durable functions can be triggered by various event sources, including Amazon SQS and Amazon EventBridge. An optional worker library is provided, which runs inside the MicroVM image to receive tasks, send heartbeats, and report results.

The MicroVM extension is available as a developer preview for the AWS Durable Execution SDK, with support for TypeScript and Python. To begin, developers must add the extensions package to their function alongside the Durable Execution SDK and integrate the MicroVM worker library into their MicroVM image. AWS states that developer preview features may undergo changes and are not recommended for production workloads. The extension is accessible in all AWS Regions that support both Lambda durable functions and Lambda MicroVMs.

Technical analysis

The integration of Lambda MicroVMs with Lambda durable functions represents a notable evolution in serverless computing, addressing specific challenges related to security, state management, and long-running processes. Individually, Lambda MicroVMs provide a compute primitive with VM-level isolation, which is a higher degree of isolation than traditional Lambda function containers. This is critical for workloads involving untrusted or agent-generated code, as it helps contain potential security risks within a dedicated virtual machine boundary. The near-instant launch, resume, and state preservation capabilities of MicroVMs further enhance their utility for stateful operations.

Lambda durable functions, on the other hand, are designed for orchestrating multi-step, resilient workflows that can persist for extended periods, up to one year. Their inherent checkpointing and automatic retry mechanisms are foundational for building fault-tolerant applications, abstracting away much of the complexity traditionally associated with distributed system resilience. The combination of these two services creates a new operational model for serverless applications.

The core innovation lies in the durable function's ability to manage the entire lifecycle of a MicroVM and execute tasks within it as durable operations. This means that a long-running workflow, orchestrated by a durable function, can now leverage the isolated, state-preserving environment of a MicroVM for specific, potentially sensitive, steps. For instance, a durable function can initiate a MicroVM session, pass a task to it, and then checkpoint the state of the overall workflow. If the MicroVM task fails, the durable function can automatically retry it, or even resume a MicroVM from a preserved state, ensuring continuity without manual intervention. This capability is particularly impactful for AI workflows and agentic applications, which often involve complex, multi-stage computations that require both isolation and persistence.

From an engineering perspective, this offering provides a robust framework for building secure software factories and CI/CD pipelines. The ability to run untrusted code, such as third-party build scripts or security scanning tools, within a VM-isolated sandbox mitigates the risk of supply chain attacks or unintended side effects on the host environment. The durable nature of the orchestration ensures that these complex, multi-step processes can withstand transient failures and continue execution over long periods, which is common in comprehensive security scans or large-scale build processes. The explicit mention of MicroVM sessions, where tasks share the same files and memory, indicates support for more cohesive, stateful execution within the isolated environment, moving beyond purely stateless, single-invocation paradigms.

The optional worker library, running within the MicroVM image, is a key component for enabling this orchestration. It facilitates communication between the durable function orchestrator and the code executing inside the MicroVM, handling task reception, heartbeat signals, and result reporting. This design pattern offloads the complexities of inter-process communication and state synchronization to the AWS-provided SDKs, simplifying the developer experience. The support for triggering durable functions from event sources like Amazon SQS and Amazon EventBridge ensures seamless integration into existing event-driven architectures.

A significant practical implication is the expansion of serverless applicability to use cases previously constrained by the ephemeral nature and limited execution duration of standard Lambda functions. Workflows requiring persistent state, high isolation for untrusted code, and execution times extending beyond typical function timeouts can now be implemented with a serverless operational model. This reduces the operational overhead associated with managing dedicated virtual machines or containers for such tasks. However, as this is a developer preview, AWS explicitly states that features may change and are not suitable for production workloads. This necessitates careful evaluation and planning for any potential adoption, with a focus on testing and understanding the evolving capabilities and limitations before deployment in critical systems. The specific details regarding pricing, performance characteristics, and resource limits beyond the one-year duration for durable functions were not disclosed in the announcement.

Sources