• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Serverless, inc.

Serverless Framework Sandboxes: Minimal AWS Lambda MicroVM Example

by

Smallest possible sandboxes configuration, using only the required artifact field and framework defaults.

  1. Serverless Framework Sandboxes: Minimal AWS Lambda MicroVM Example

Minimal sandbox example

The smallest possible sandboxes configuration: a single sandbox with only the required artifact field. Every other setting falls back to a framework default.

sandboxes:
  app:
    artifact: ./app

What the defaults resolve to

SettingDefault
minimumMemory2048 MiB
architectureARM64
base imagelatest managed al2023 base
egressINTERNET_EGRESS (outbound internet, no VPC)
hooksoff — the app only needs to serve its HTTP port
IAMauto-generated build + execution roles (least-privilege)
logsCloudWatch group /aws/lambda-microvms/<image-name>

The app (app/app.js) is a tiny Node.js HTTP echo server on port 8080. No lifecycle-hook server is needed because hooks are off by default.

Deploy

serverless deploy
✔ Service deployed to stack sandboxes-minimal-dev (…s)

dashboard: https://<region>.console.aws.amazon.com/cloudwatch/home?region=<region>#dashboards/dashboard/sandboxes-minimal-dev-sandboxes

Observability is on by default, so serverless deploy prints a CloudWatch dashboard URL even for this minimal config.

Invoke

serverless invoke --sandbox app --path /hello
# --sandbox names which sandbox to call and is required (even with one sandbox).
# --method and --path are optional (default GET /).

The app echoes the request:

{"method":"GET","path":"/hello","body":""}

Logs

Defaults to the last 10 minutes of events; widen the window with --startTime:

serverless logs --sandbox app --startTime 30m

Develop locally

serverless dev --sandbox app   # edits to app/ rebuild the image automatically

It starts a local, SDK-compatible AWS Lambda MicroVMs emulator (prints its endpoint, e.g. http://127.0.0.1:9100); point the AWS SDK/CLI at that endpoint (--endpoint-url) to launch the sandbox locally with no cloud cost.

Remove

serverless remove

See ../complete/ for a fuller example with a VPC, lifecycle hooks, environment variables, tags, and an s3:// pre-built artifact.

Contents

  • Minimal sandbox example
  • What the defaults resolve to
  • Deploy
  • Invoke
  • Logs
  • Develop locally
  • Remove

Related

GuidesPluginsExamplesSlack CommunitySupport