awslabs/agent-plugins/aws-lambda-microvms
Claude Code and agent skill by awslabs/agent-plugins
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Build, run, debug, and operate applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments that run inside a container with up to 8-hour lifetimes. Triggers on: Lambda 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.
Install
npx vskill@latest install awslabs/agent-plugins/aws-lambda-microvmsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as awslabs/agent-plugins/aws-lambda-microvms.
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:
- Runs your application as a container inside a Firecracker microVM — you can reproduce the environment locally.
- Runs Amazon Linux 2023 as the base OS inside the MicroVM.
- Boots from a memory + disk snapshot captured at image build time, so application init is skipped on run.
- Has a dedicated, TLS-terminated HTTPS endpoint reachable with an auth token.
- Can be suspended and resumed with state preserved; lives up to 8 hours.
Two-resource model:
MicrovmImage— a versioned artifact built from{S3 zip with Dockerfile} + baseImageArn. Each version has per-architecture/chipsetBuilds.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.
When to use
Choose Lambda MicroVMs when
- Analytics workloads — isolated compute for data processing, ETL jobs, or query execution with strong tenant separation.
- AI / agent code execution sandboxes — fresh, isolated environment per session, fast resume between turns.
- Interactive code playgrounds & notebooks — Jupyter, REPLs, dev environments executing user code.
- Reinforcement-learning environments — clean per-episode envs with tool access.
- Multi-tenant CI executors / build runners — strong tenant isolation.
- Game / simulation servers — sessionful, long-lived (up to 8 hr) workloads.
- Security scanning — running untrusted analyzers in isolation.
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.
Choose AWS Lambda (functions) when
- The workload fits in 15 minutes.
- Per-invocation isolation is fine; no need for session state held in memory.
- Fully automatic scaling is preferred (no
RunMicrovmto manage). - Event-source integrations (S3, SQS, EventBridge, etc.) drive the function.
Choose something else when
- Continuous compute beyond 8 hr → ECS / EKS / EC2.
- Lift-and-shift workloads needing kernel modifications or a non-Linux OS → EC2.
Typical workflow
- Check regional availability — confirm Lambda MicroVMs is available in your target region (run
aws lambda-microvms list-managed-microvm-images). Your S3 artifact bucket and any network connectors must be in the same region as the image. - Package an app: zip with a
Dockerfileat the root, upload to S3 (same region as the image). - Implement lifecycle hooks (optional but recommended) — HTTP endpoints on a port you specify (commonly
9000) for/run,/resume,/suspend,/terminate,/ready,/validate. - CreateMicrovmImage — pointing at the S3 artifact, a managed base image, and a build role. Lambda compiles the Dockerfile into an OCI image, starts your app, calls
/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. - RunMicrovm — pick an image version, attach
executionRoleArn, setidlePolicy, ingress/egress connectors, and (optionally) arunHookPayload. Receive anendpointURL andmicrovmId. - CreateMicrovmAuthToken — get an auth token (max 60 min) with
allowedPortsspecifying which ports the token grants access to. Send traffic to the endpoint withX-aws-proxy-auth: <token>. - Suspend / Resume / Terminate — explicit APIs, or let the
idlePolicydrive it (maxIdleDurationSeconds,suspendedDurationSeconds,autoResumeEnabled).
Core CLI commands
See `references/getting-started.md` for the full walkthrough including --hooks config and lifecycle hooks.
Hook configuration
Hooks are organized into two groups under the --hooks parameter:
microvmImageHooks (build-time)
Recommendation: Implement the image build hooks (/readyand/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 duringRunMicrovm. 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.
Per-MicroVM size limits
| 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.
Additional capabilities
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:
- Filesystem mounts — EFS, FUSE-based filesystems.
- Nested containers — running additional containers with containerd inside the MicroVM.
- eBPF programs — tracing, profiling, or custom network policies.
Shell ingress for agent use cases
For programmatic shell access (agent workflows, remote command execution), use the SHELL_INGRESS network connector:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/aws-serverless/skills/aws-lambda-microvms/SKILL.md
Popularity
- Repository stars
- 855
- Repository forks
- 141
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/awslabs/agent-plugins/aws-lambda-microvms)