> Build, run, debug, and operate applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments that MicroVMs, Firecracker isolation, snapshot-resumable compute, suspend/resume, sandboxed or untrusted code execution, AI/agent code-execution sandboxes, interactive code playgrounds and notebooks (Jupyter, REPLs), reinforcement-learning environments, multi-tenant CI executors and build runners, sessionful game or simulation servers, isolated security scanners, long-lived sessions, or port-listening servers (gRPC, WebSocket, custom TCP). For standard event-driven Lambda functions, use the aws-lambda skill instead.
npx skills add https://github.com/awslabs/agent-plugins --skill aws-lambda-microvms
> The AWS MCP server is recommended for sandboxed execution and audit logging.
AWS Lambda MicroVMs are serverless compute environments that combine Firecracker VM isolation with container-like efficiency. Each MicroVM:
Two-resource model:
MicrovmImage — a versioned artifact built from {S3 zip with Dockerfile} + baseImageArn. Each version has per-architecture/chipset Builds.Microvm — a running instance created (RunMicrovm) from an image version.Two roles:
buildRoleArn — used during image build (S3 read, CloudWatch logs, optional ECR).executionRoleArn — assumed at runtime by the running MicroVM.In general, Lambda MicroVMs are suited for long-lived sessions, real port-listening servers (gRPC, WebSocket, custom TCP protocols), state preserved across periods of inactivity (suspend/resume), container-level access (FUSE, eBPF, custom syscalls), or session-affine routing to a specific compute environment.
RunMicrovm to manage).aws lambda-microvms list-managed-microvm-images). Your S3 artifact bucket and any network connectors must be in the same region as the image.Dockerfile at the root, upload to S3 (same region as the image).9000) for /run, /resume, /suspend, /terminate, /ready, /validate./ready, snapshots disk + memory, optionally validates with /validate. Lambda will periodically release new managed image versions, and customers should re-build using the latest version to ensure they have up to date images.executionRoleArn, set idlePolicy, ingress/egress connectors, and (optionally) a runHookPayload. Receive an endpoint URL and microvmId.allowedPorts specifying which ports the token grants access to. Send traffic to the endpoint with X-aws-proxy-auth: <token>.idlePolicy drive it (maxIdleDurationSeconds, suspendedDurationSeconds, autoResumeEnabled).# Create an image (zip with Dockerfile at root in S3, plus a managed base image)
aws lambda-microvms create-microvm-image \
--name my-image \
--base-image-arn arn:aws:lambda:<region>:aws:microvm-image:al2023-1 \
--build-role-arn arn:aws:iam::<acct>:role/MicroVMBuildRole \
--code-artifact '{"uri":"s3://<bucket>/<key>.zip"}'
# Run a MicroVM (returns endpoint + microvmId). --image-identifier takes the
# image ARN (the bare name is rejected); --image-version is the full major.minor string.
aws lambda-microvms run-microvm \
--image-identifier arn:aws:lambda:<region>:<acct>:microvm-image:my-image \
--image-version 1.0 \
--execution-role-arn arn:aws:iam::<acct>:role/MicroVMExecutionRole \
--idle-policy '{"maxIdleDurationSeconds":900,"suspendedDurationSeconds":300,"autoResumeEnabled":true}'
# Mint an auth token and call the endpoint
TOKEN=$(aws lambda-microvms create-microvm-auth-token \
--microvm-identifier microvm-... --expiration-in-minutes 30 \
--allowed-ports '[{"port":8080}]' \
--query 'authToken."X-aws-proxy-auth"' --output text)
curl "<endpoint>/" -H "X-aws-proxy-auth: $TOKEN"
# Lifecycle
aws lambda-microvms suspend-microvm --microvm-identifier microvm-...
aws lambda-microvms resume-microvm --microvm-identifier microvm-...
aws lambda-microvms terminate-microvm --microvm-identifier microvm-...
See references/getting-started.md for the full walkthrough including --hooks config and lifecycle hooks.
Hooks are organized into two groups under the --hooks parameter:
microvmImageHooks (build-time)> Recommendation: Implement the image build hooks (/ready and /validate) for best performance. They enable the platform to capture a complete snapshot and prefetch the portions accessed at run time.
| Hook | Purpose | Timeout range |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- |
| ready | Called during application boot. When this hook returns a 200 status code, it signals to the platform that the application is ready to be snapshotted. Use this to ensure your application is fully booted before a snapshot is taken. If your application is not yet ready, return a 503 status code until it is ready for snapshotting. | 1–3600s (default 30s) |
| validate | Called after running your application from the microVM snapshot. Use this hook to validate the application is ready to serve traffic. This hook additionally allows the platform to sample the portions of the snapshot that are used when your application is ran, allowing Lambda to prefetch those portions of the snapshot to reduce latency. To get the best performance, run mock payloads through the application during validate. When this hook returns a 200, it signals to the Lambda the MicroVM image is valid. If your application needs more time to run its validate workflow, return a 503 status code. | 1–3600s (default 30s) |
> Why implement /ready? It signals the platform that your application has fully booted. Without it, the snapshot may be taken mid-initialization, meaning the cached state is incomplete and every run repeats part of the boot sequence.
>
> Why implement /validate? It lets the platform verify the snapshot is correct, and also samples which portions of the snapshot are accessed during RunMicrovm. This allows the platform to prefetch those portions on future launches, reducing cold-start times.
microvmHooks (runtime)| Hook | Purpose | Timeout range |
| ----------- | ---------------------------------- | ------------------ |
| run | Fires once after run from snapshot | 1–60s (default 1s) |
| resume | Fires after SUSPENDED → RUNNING | 1–60s (default 1s) |
| suspend | Fires before RUNNING → SUSPENDED | 1–60s (default 1s) |
| terminate | Fires before termination | 1–60s (default 1s) |
See references/getting-started.md for a full example enabling all hooks.
| Resource | Limit |
| -------------------------- | ----- |
| Maximum vCPUs per MicroVM | 16 |
| Maximum memory per MicroVM | 32 GB |
> For all other quotas — concurrent MicroVMs per account, launch rate, image count, max execution duration, auth token TTL, Lambda Network Connector (LNC) limits, per-ENI bandwidth, etc. — check the AWS docs / Service Quotas console. Most are soft quotas, raisable through Service Quotas / Support.
By default, the container runs with a restricted set of Linux capabilities. Set --additional-os-capabilities '["ALL"]' at image creation time only when required by your use case:
aws lambda-microvms create-microvm-image \
--name my-image \
--base-image-arn arn:aws:lambda:<region>:aws:microvm-image:al2023-1 \
--build-role-arn arn:aws:iam::<acct>:role/MicroVMBuildRole \
--code-artifact '{"uri":"s3://<bucket>/<key>.zip"}' \
--additional-os-capabilities '["ALL"]'
For programmatic shell access (agent workflows, remote command execution), use the SHELL_INGRESS network connector:
# 1. Run with SHELL_INGRESS enabled
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 \
--ingress-network-connectors '["arn:aws:lambda:<region>:aws:network-connector:aws-network-connector:SHELL_INGRESS"]' \
--idle-policy '{"maxIdleDurationSeconds":900,"suspendedDurationSeconds":300,"autoResumeEnabled":true}'
# Response includes microvmId and endpoint
# 2. Mint a shell auth token (max 60 min; use shortest duration needed)
# Treat the token as a secret — avoid logging, storing in files, or shell history.
TOKEN=$(aws lambda-microvms create-microvm-shell-auth-token \
--microvm-identifier microvm-... \
--expiration-in-minutes 15 \
--query 'authToken."X-aws-proxy-auth"' --output text)
# 3. Connect via WebSocket (port 8022)
# CLI args are visible in process listings (ps aux). For shared hosts,
# pipe the header via a file descriptor or use a wrapper script.
websocat "wss://<endpoint>/shell" \
-H "Sec-WebSocket-Protocol: lambda-microvms.authentication.${TOKEN}, lambda-microvms, lambda-microvms.port.8022"
The shell drops into the same container as the running application — same network namespace, filesystem, and process tree. This provides an interactive PTY over a WebSocket-based shell channel accessible from any client (terminal or browser), suitable for agent-driven workflows that need to execute commands inside the MicroVM.
Prerequisites: MicroVM must be run with SHELL_INGRESS attached, and caller also needs lambda:CreateMicrovmShellAuthToken.
delete-microvm-image-version to clean up.SuspendMicrovm from outside (via the public API)./run, /resume, /suspend, /terminate) are fast-notification only (1–60s timeout). Don't use them for slow init.Pick the reference that matches your task:
references/getting-started.md — prerequisites (S3 bucket, build role trust policy), packaging, end-to-end CLI walkthrough, first run + token + curl.references/lifecycle-model.md — image vs. MicroVM state machines, the six lifecycle hooks (paths, timeouts, what to do in each), idle/suspend/resume semantics, hook payloads.references/snapshots-and-uniqueness.md — what gets snapshotted, the uniqueness pitfall, CSPRNGs by language, env vars vs. run configuration, snapshot size inspection.references/networking.md — ingress vs. egress connectors, port routing, X-aws-proxy-* headers, WebSocket subprotocols, HTTP/2 / gRPC, VPC egress.references/iam-and-security.md — build role vs. execution role, trust policies, auth tokens (regular vs. shell), lambda:PassNetworkConnector.references/troubleshooting.md — image build error codes, run/connect failures, hook timeouts, network connector issues, debugging via shell access.8080. Override per-request with X-aws-proxy-port or per-WebSocket with subprotocol lambda-microvms.port.<n>.aws:SourceAccount (or aws:SourceArn) condition keys to trust policies. See references/iam-and-security.md.references/snapshots-and-uniqueness.md.Assess Kubernetes workloads and cluster configuration for AKS Automatic compatibility. Identifies incompatibilities, generates fixes, and guides migration from AKS Standard to AKS Automatic. WHEN: migrate to AKS Automatic, check AKS Automatic readiness, validate manifests for Automatic, assess cluster for Automatic compatibility, fix deployment for Automatic compatibility, identify AKS Automatic migration blockers, is my cluster ready for AKS Automatic.
Discovers available Azure OpenAI model capacity across regions and projects. Analyzes quota limits, compares availability, and recommends optimal deployment locations based on capacity requirements. USE FOR: find capacity, check quota, where can I deploy, capacity discovery, best region for capacity, multi-project capacity search, quota analysis, model availability, region comparison, check TPM availability. DO NOT USE FOR: actual deployment (hand off to preset or customize after discovery), quota increase requests (direct user to Azure Portal), listing existing deployments.
Interactive guided deployment flow for Azure OpenAI models with full customization control. Step-by-step selection of model version, SKU (GlobalStandard/Standard/ProvisionedManaged), capacity, RAI policy (content filter), and advanced options (dynamic quota, priority processing, spillover). USE FOR: custom deployment, customize model deployment, choose version, select SKU, set capacity, configure content filter, RAI policy, deployment options, detailed deployment, advanced deployment, PTU deployment, provisioned throughput. DO NOT USE FOR: quick deployment to optimal region (use preset).
Unified Azure OpenAI model deployment skill with intelligent intent-based routing. Handles quick preset deployments, fully customized deployments (version/SKU/capacity/RAI policy), and capacity discovery across regions and projects. USE FOR: deploy model, deploy gpt, create deployment, model deployment, deploy openai model, set up model, provision model, find capacity, check model availability, where can I deploy, best region for model, capacity analysis. DO NOT USE FOR: listing existing deployments (use foundry_models_deployments_list MCP tool), deleting deployments, agent creation (use agent/create), project creation (use project/create).
Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions. Automatically checks current region first and shows alternatives if needed. USE FOR: quick deployment, optimal region, best region, automatic region selection, fast setup, multi-region capacity check, high availability deployment, deploy to best location. DO NOT USE FOR: custom SKU selection (use customize), specific version selection (use customize), custom capacity configuration (use customize), PTU deployments (use customize).
This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakehouses, or ensuring data lineage and reproducibility in biological research. Covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integrations with workflow managers (Nextflow, Snakemake) and MLOps platforms (W&B, MLflow), and deployment strategies.
Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.
Take awslabs/aws-lambda-microvms from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.