Skip to content
Agentmart
Submit a tool

aws-lambda-microvms

Builds, runs, debugs, and operates applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments running…

Skill by awsOfficial

IndexedApache-2.0★ 3,049
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aws-aws-lambda-microvms

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Builds, runs, debugs, and operates applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments running inside a container with up to 8 hr lifetimes. Applicable when workloads need strong isolation between tenants, isolated serverless compute, sandbox compute, or secure multi-tenant execution. Also suited for AI/agent code-execution sandboxes, interactive code playgrounds and notebooks (Jupyter, REPLs, dev environments running user-supplied code), reinforcement-learning environments, multi-tenant CI executors and build runners, sessionful game or simulation servers, or isolated security scanners. Also applicable when the workload needs long-lived sessions, a real port-listening server (gRPC, WebSocket, custom TCP protocols), state preserved across periods of inactivity (suspend/resume), container-level access (FUSE, eBPF, custom syscalls), or session-affine routing.

Use cases: backend, devops, cloud, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/aws-lambda-microvms

What's inside

Skill name
aws-lambda-microvms
Description
Builds, runs, debugs, and operates applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments running inside a container with up to 8 hr lifetimes. Applicable when workloads need strong isolation between tenants, isolated serverless compute, sandbox compute, or secure multi-tenant execution. Also suited for AI/agent code-execution sandboxes, interactive code playgrounds and notebooks (Jupyter, REPLs, dev environments running user-supplied code), reinforcement-learning environments, multi-tenant CI executors and build runners, sessionful game or simulation servers, or isolated security scanners. Also applicable when the workload needs long-lived sessions, a real port-listening server (gRPC, WebSocket, custom TCP protocols), state preserved across periods of inactivity (suspend/resume), container-level access (FUSE, eBPF, custom syscalls), or session-affine routing.
License
Apache-2.0
Instructions
210 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (7)

  • SKILL.md
  • getting-started.md · references/
  • iam-and-security.md · references/
  • lifecycle-model.md · references/
  • networking.md · references/
  • snapshots-and-uniqueness.md · references/
  • troubleshooting.md · references/

SKILL.md (first lines)

# 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/chipset `Build`s.
- `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 Lambda Event Functions when

- The workload fits in 15 minutes.
- Per-function isolation is sufficient; if ordinary event/request handlers need execution environments dedicated to one invoker or tenant, use Event Functions on On-Demand with tenant isolation mode. Do not assume Lambda creates a fresh Firecracker VM or execution environment for every invocation.
- No session state needs to remain in memory, on disk, or in running processes between interactions.
- Fully automatic scaling is preferred (no `RunMicrovm` to 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

0. **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.
1. **Package** an app: zip with a `Dockerfile` at the root, upload to S3 (same region as the image).
2. **Implement lifecycle hooks** (optional but recommended) — HTTP endpoints on a port you specify (commonly `9000`) for `/run`, `/resume`, `/suspend`, `/terminate`, `/ready`, `/validate`.
3. **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.
4. **RunMicrovm** — pick an image version, attach `executionRoleArn`, set `idlePolicy`, ingress/egress connectors, and (optionally) a `runHookPayload`. Receive an `endpoint` URL and `microvmId`.
5. **CreateMicrovmAuthToken** — get an auth token (max 60 min) with `allowedPorts` specifying which ports the token grants access to. Send traffic to the endpoint with `X-aws-proxy-auth: <token>`.
6. **Suspend / Resume / Terminate** — explicit APIs, or let the `idlePolicy` drive it (`maxIdleDurationSeconds`, `suspendedDurationSeconds`, `autoResumeEnabled`).

### Core CLI commands

```bash
# 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 and --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`](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 (`/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`](references/getting-started.md) for a full example enabling all hooks.

From aws/agent-toolkit-for-aws, Apache-2.0.

More from aws/agent-toolkit-for-aws

Compare and alternatives

    Featured in

    Signals

    Stars
    3,049
    Forks
    394
    Open issues
    40
    Last commit (this folder)
    Oct 12, 2026 (15 days ago)

    From GitHub (fetched Oct 24, 2026).

    Details

    License
    Apache-2.0
    First seen
    Oct 24, 2026
    Last checked
    Oct 24, 2026

    More from aws

    Cite this page

    aws-lambda-microvms skill. Agent Mart. https://agentmart.dev/skills/aws-aws-lambda-microvms (last updated 2026-10-24)