AWS Lambda MicroVM from Zip file

AWS Lambda MicroVMs

Deploy an AWS Lambda MicroVM from a zip artifact containing a Dockerfile and application code, built server-side.

This pattern deploys a Lambda MicroVM from a zip artifact uploaded to S3. The zip contains a Dockerfile and application code. Lambda builds the image server-side on the al2023 base image, waits for the /ready lifecycle hook, and takes a Firecracker snapshot.
The MicroVM resumes rapidly from the snapshot, exposing an HTTP endpoint on port 8080 gated by an auth token. It automatically suspends after idle timeout and resumes on next request — each MicroVM runs in its own isolated VM with hardware-level isolation.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-microvms-from-zip

Deploy

bash deploy.sh


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

bash cleanup.sh

Created by:

Alexander Vladimirov

Alexander Vladimirov

Senior Serverless Solutions Architect at AWS, specializing in Agentic AI Workloads.

Follow on LinkedIn