Amazon Web Services (AWS) today announced AWS Lambda MicroVMs, a groundbreaking new serverless compute primitive designed to enable developers to run user-generated or AI-generated code in highly isolated, stateful execution environments. This innovation addresses a long-standing challenge in multi-tenant applications by offering virtual machine-level isolation with near-instant launch and resume capabilities, coupled with direct control over environment lifecycle and state, all without the overhead of managing underlying infrastructure or requiring deep expertise in complex virtualization technologies. The new service is powered by Firecracker, the same lightweight virtualization technology that has demonstrably scaled to underpin over 15 trillion monthly AWS Lambda function invocations.
The Evolving Landscape of Serverless and Untrusted Code Execution
The advent of cloud computing profoundly transformed application development, with serverless computing emerging as a pivotal paradigm. AWS Lambda, launched in 2014, pioneered the Functions-as-a-Service (FaaS) model, allowing developers to run code without provisioning or managing servers, paying only for the compute time consumed. This model proved immensely popular for event-driven, stateless workloads, driving significant innovation and operational efficiency. However, as applications grew in complexity and interactivity, a new class of multi-tenant applications emerged, presenting unique computational challenges. These applications often require the secure execution of code not authored by the primary application developer, ranging from end-user scripts to sophisticated AI-generated programs.
Historically, developers building such platforms faced a difficult dilemma when choosing an execution environment. Traditional virtual machines (VMs) offer robust isolation, ensuring that code from one user cannot interfere with another or the host system. However, their startup times, often measured in minutes, make them unsuitable for interactive, low-latency experiences. Containers, on the other hand, provide faster launch times, typically in seconds, but rely on a shared kernel architecture. While efficient, this shared environment necessitates extensive custom hardening and security configurations to safely contain untrusted code, adding significant engineering complexity and potential security vulnerabilities if not managed meticulously. Existing Functions-as-a-Service (FaaS) offerings, including standard AWS Lambda functions, are optimized for short-lived, event-driven, request-response patterns. They are not inherently designed for long-running, interactive sessions that demand the retention of environment state across user interactions, such as open files, in-memory data structures, or running processes.
This presented a significant gap, forcing developers to accept undesirable tradeoffs between performance and isolation, or to invest substantial engineering resources in building and operating custom virtualization infrastructure. Such an undertaking demands deep expertise in systems programming, virtualization, and security, diverting valuable engineering talent away from core product development. AWS Lambda MicroVMs is purpose-built to bridge this gap, offering a solution that combines the best aspects of these different compute models.
Introducing AWS Lambda MicroVMs: A Hybrid Solution for Modern Workloads

AWS Lambda MicroVMs delivers three distinct yet interconnected capabilities previously unavailable together in a single AWS compute service, forming a robust foundation for next-generation applications.
Firstly, it provides virtual machine-level isolation, a critical security feature derived directly from Firecracker. Each user session runs within its own dedicated MicroVM, ensuring no shared kernel and no shared resources between different users. This architectural design inherently contains untrusted code supplied by one user to their specific execution environment, preventing unauthorized access to other users’ environments or the underlying system infrastructure. This strong isolation is paramount for applications dealing with sensitive data or running potentially malicious code.
Secondly, the service boasts rapid launch and resume capabilities. The operational model is "image-then-launch." Developers create a MicroVM Image by supplying a Dockerfile and their application code packaged as a zip artifact, typically stored in Amazon Simple Storage Service (Amazon S3). Lambda then processes this Dockerfile, initializes the application, and critically, takes a Firecracker snapshot of the running environment’s memory and disk state. Subsequent MicroVMs launched from this image resume directly from this pre-initialized snapshot, bypassing the traditional cold boot process. This innovative approach means both initial launches and idle resumes achieve near-instant startup latency. Even interactive sessions involving multi-gigabyte environments can come back online quickly enough to feel responsive and seamless to the end user, dramatically improving user experience.
Thirdly, Lambda MicroVMs supports stateful execution. Unlike traditional FaaS functions that are typically stateless, a running MicroVM retains its memory, disk, and running processes throughout the user’s session. This is a game-changer for interactive applications. During periods of user inactivity, a MicroVM can be suspended—with its complete memory and disk state intact—and then swiftly resumed when traffic arrives. This means installed packages, pre-loaded machine learning models, and working filesets are immediately available upon session resumption, eliminating the need to re-initialize or reload resources. MicroVMs support up to 8 hours of total runtime, and can be automatically suspended after a configurable idle window, significantly reducing running costs while preserving full state for rapid resumption. Developers should note that applications generating unique content, establishing network connections, or loading ephemeral data during initialization may need to integrate with service-provided hooks for compatibility with the snapshotting process.
Operational Simplicity and Developer Experience
The developer experience with AWS Lambda MicroVMs emphasizes ease of use and abstraction from underlying infrastructure complexities. To get started, developers navigate to the AWS Lambda console, where Lambda MicroVMs now features prominently in the left-hand navigation menu. The initial step involves creating a MicroVM Image.
Consider a common use case: deploying a Flask web application. A developer would package their Flask API (app.py) and its associated Dockerfile into a zip file, then upload it to an Amazon S3 bucket.

An example app.py might look like this:
import logging
from flask import Flask, jsonify
app = Flask(__name__)
logging.basicConfig(level=logging.INFO)
@app.route("/")
def hello():
app.logger.info("Received request to hello world endpoint")
return jsonify(message="Hello, World!")
if __name__ == "__main__":
app.run(host="0.0.0.0", port=5000)
And a corresponding Dockerfile:
FROM public.ecr.aws/lambda/microvms:al2023-minimal
RUN dnf install -y python3 python3-pip && dnf clean all
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
EXPOSE 5000
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
Using the AWS CLI, the developer would execute a command similar to:
aws lambda-microvms create-microvm-image --code-artifact uri=<path/to/s3/artifact.zip> --name <VM_image_name> --base-image-arn arn:aws:lambda:us-east-1:aws:microvm-image:al2023-1 --build-role-arn <IAM role ARN>
Upon execution, Lambda retrieves the zip artifact from S3, runs the specified Dockerfile, initializes the application within a temporary environment, and then captures a Firecracker snapshot of the running disk and memory state. Build logs are streamed in real-time to Amazon CloudWatch under a dedicated log group (/aws/lambda/microvms/<image-name>), providing full visibility into the image creation process. Once the image is ready, it appears in the console with its unique Amazon Resource Name (ARN) and version number.
Launching a MicroVM from this image is equally straightforward, available via the AWS Console or CLI. For instance:
aws lambda-microvms run-microvm --image-identifier arn:aws:lambda:<region>:<acct>:microvm-image:my-image --execution-role-arn arn:aws:iam::<acct>:role/MicroVMExecutionRole --idle-policy '"maxIdleDurationSeconds":900,"suspendedDurationSeconds":300,"autoResumeEnabled":true'
In this command, the developer specifies the image ARN and an idle policy, perhaps configured to auto-suspend the MicroVM after 15 minutes of inactivity and auto-resume upon the next incoming request. Notably, no complex networking setup is required; Lambda automatically assigns the MicroVM a unique ID, returns a dedicated endpoint URL, and starts a new MicroVM directly from the pre-initialized snapshot. The Flask application, in this example, is already running the moment the launch completes, providing a fully initialized, bootstrapped compute environment with a single API call.
To interact with the running MicroVM, a short-lived authentication token is generated via the CLI and attached to a standard HTTPS request using the X-aws-proxy-auth header. Requests land on the Flask application immediately. The true power of stateful execution becomes evident when the MicroVM is allowed to sit idle past its suspend threshold. The MicroVM is suspended, its memory and disk state securely snapshotted and stored. When another request arrives, the MicroVM resumes with the application state fully intact. From the client’s perspective, the pause is imperceptible, creating a continuous and responsive user experience.

The Firecracker Foundation: A Proven Technology
The robustness and operational maturity of AWS Lambda MicroVMs are deeply rooted in its underlying technology: Firecracker. Open-sourced by AWS in November 2018, Firecracker is a virtualization technology designed specifically for creating and managing secure, multi-tenant micro-VMs. It was initially developed to power serverless offerings like AWS Lambda and AWS Fargate, demonstrating its capability to handle immense scale and strict security requirements.
Firecracker distinguishes itself through its minimal attack surface, low overhead, and rapid boot times, typically in milliseconds. This is achieved by stripping away unnecessary device emulation and focusing solely on the components required for serverless functions and containers. Its design philosophy emphasizes security by minimizing the host-facing attack surface and providing strong isolation guarantees. The fact that Firecracker has successfully powered trillions of Lambda function invocations monthly provides unparalleled proof of its reliability, performance, and security at an unprecedented scale. This proven foundation significantly contributes to the confidence developers can place in Lambda MicroVMs for executing critical and sensitive workloads.
Strategic Implications and Market Impact
The introduction of AWS Lambda MicroVMs represents a strategic expansion of AWS’s serverless portfolio, poised to significantly impact various industries and application development paradigms.
For developers, it dramatically simplifies the process of building complex multi-tenant applications that require secure, isolated, and stateful execution. It abstracts away the undifferentiated heavy lifting of managing virtualization infrastructure, allowing engineering teams to focus their resources on innovating and differentiating their core product. This shift enables smaller teams to tackle challenges that previously required extensive specialized expertise and significant investment.
From AWS’s perspective, this offering strengthens its leadership in the serverless domain by filling a critical gap that existing FaaS, container, and VM services could not adequately address individually. It expands Lambda’s addressable market to include use cases previously difficult or inefficient to implement on the platform. In the competitive cloud landscape, this positions AWS strongly against other providers, offering a unique combination of isolation, speed, and statefulness.

The target industries and use cases for Lambda MicroVMs are diverse and growing rapidly:
- AI Coding Assistants and Interactive Code Environments: Platforms like online IDEs, Jupyter notebooks, or generative AI coding tools that need to execute user-written code safely and retain session state.
- Data Analytics Platforms: Environments where users can upload and run custom scripts (e.g., Python, R) against datasets without compromising the underlying infrastructure or other users’ sessions.
- Vulnerability Scanners: Tools that execute potentially malicious code snippets in isolated environments to test for software vulnerabilities.
- Game Servers: Running user-supplied game scripts or mods in a secure, performant, and isolated manner.
- Educational Platforms: Providing sandboxed environments for students to learn and experiment with programming languages.
- CI/CD Environments: Securely running build or test jobs that might involve untrusted external code or dependencies.
The synergy between Lambda MicroVMs and existing AWS Lambda Functions is also a key aspect. Lambda Functions remain the optimal choice for event-driven, short-lived, request-response workloads. However, an application using Lambda Functions for its event-driven backend can seamlessly call into Lambda MicroVMs for specific steps that require running untrusted code in isolation or maintaining state across interactions. This complementary approach allows developers to architect highly efficient and secure applications by leveraging the right compute primitive for each component.
The pricing model for Lambda MicroVMs reflects its stateful nature, with idle MicroVMs being suspendable either explicitly via an API call or automatically through a configurable lifecycle policy. This suspension significantly reduces running costs while preserving the full application state for fast resumption, offering a cost-effective solution for interactive applications with unpredictable usage patterns. Detailed pricing information is available on the AWS Lambda pricing page.
Availability and Technical Specifications
AWS Lambda MicroVMs is available today in key AWS Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Ireland), and Asia Pacific (Tokyo). The service currently supports the ARM64 architecture, offering robust performance and cost efficiency. Each MicroVM can be configured with up to 16 vCPUs, 32 GB of memory, and 32 GB of disk space, providing substantial resources for demanding applications.
Developers interested in exploring this new capability can visit the AWS Lambda console to get started, or learn more on the dedicated Lambda MicroVMs product page. Comprehensive documentation, including the Lambda MicroVMs Developer Guide, is also available to assist with implementation and best practices. This launch marks a significant milestone in serverless computing, offering a powerful, secure, and flexible solution for the next generation of interactive, multi-tenant applications.
