aws AWS News Blog ·

AWS Lambda Introduces MicroVMs for Isolated, Stateful Workloads

blogaiinfraawsengineeraws-lambda
feature

AWS Lambda now offers MicroVMs, a new compute primitive providing virtual machine-level isolation and stateful execution environments for user- or AI-generated code. Powered by Firecracker, this feature enables near-instant launch and resume capabilities, addressing the need for secure, dedicated environments in multi-tenant applications like AI assistants and interactive code editors. Customers can now run untrusted code with robust isolation and low latency without managing underlying infrastructure, with MicroVMs complementing existing Lambda Functions for event-driven tasks.

  • AWS Lambda MicroVMs enable isolated, stateful execution environments
  • Purpose-built for multi-tenant applications requiring isolated user code execution
  • Leverages Firecracker for robust isolation and rapid startup
  • Stateful execution with configurable idle suspension and resume
  • New API surface and distinct resource within AWS Lambda
Features (5)
  • AWS Lambda MicroVMs enable isolated, stateful execution environments

    AWS Lambda MicroVMs provide a new serverless compute primitive offering VM-level isolation, near-instant launch and resume, and direct control over environment lifecycle and state. This allows for the safe execution of user- or AI-generated code in dedicated environments without infrastructure management.

  • Purpose-built for multi-tenant applications requiring isolated user code execution

    MicroVMs are designed for multi-tenant applications that need to provide each end-user with a dedicated, isolated execution environment for running untrusted code. This includes use cases like AI coding assistants, interactive code environments, data analytics platforms, and game servers.

  • Leverages Firecracker for robust isolation and rapid startup

    Powered by the same Firecracker technology used in AWS Lambda Functions, MicroVMs offer strong isolation with no shared kernel or resources between users. Applications resume from pre-initialized snapshots, enabling rapid launches and idle resumes with low latency.

  • Stateful execution with configurable idle suspension and resume

    MicroVMs retain memory, disk, and running processes across user sessions, supporting up to 8 hours of runtime. They can be automatically suspended after a configurable idle period and resumed quickly when new traffic arrives, preserving application state.

  • New API surface and distinct resource within AWS Lambda

    Lambda MicroVMs introduce a distinct API surface and are managed as a new resource within AWS Lambda. They complement Lambda Functions, which remain the preferred choice for event-driven, request-response workloads.

Enhancements (1)
  • Example workflow for creating and running MicroVM Images

    The post demonstrates creating a MicroVM Image by packaging a Flask web app and Dockerfile, uploading it to S3, and using AWS CLI commands to create the image and run a MicroVM. Build logs are streamed to Amazon CloudWatch, and MicroVMs can be configured with idle policies for suspension and auto-resume.

Read the original announcement →

https://aws.amazon.com/blogs/aws/run-isolated-sandboxes-with-full-lifecycle-control-aws-lambda-introduces-microvms/

Related releases