# Lambda Snapstart, and snapshots as a tool for system builders

DevFeed: [Lambda Snapstart, and snapshots as a tool for system builders](<https://devfeed.tech/articles/lambda-snapstart-and-snapshots-as-a-tool-for-system-builders-12529.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2022/11/29/snapstart.html>)

Author: Marc Brooker

Published: 2022-11-29T00:00:00Z

Content type: opinion

Language: en

Sources: [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog.md>), [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog-2.md>)

Topics: [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [systems](<https://devfeed.tech/topics/systems.md>), [cloud-infrastructure](<https://devfeed.tech/topics/cloud-infrastructure.md>), [Disk image](<https://devfeed.tech/topics/disk-image.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [boot](<https://devfeed.tech/topics/boot.md>), [JIT](<https://devfeed.tech/topics/jit.md>), [tracing](<https://devfeed.tech/topics/tracing.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [boot](<https://devfeed.tech/tags/boot.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [jit](<https://devfeed.tech/tags/jit.md>), [memory](<https://devfeed.tech/tags/memory.md>), [sandboxes](<https://devfeed.tech/tags/sandboxes.md>), [snapshots](<https://devfeed.tech/tags/snapshots.md>), [storage](<https://devfeed.tech/tags/storage.md>), [systems](<https://devfeed.tech/tags/systems.md>), [tracing](<https://devfeed.tech/tags/tracing.md>)

## AI overview

This article examines AWS Lambda Snapstart, which uses microVM snapshots taken after function initialization to reduce cold start times. It explains how cloned snapshots create multiple initialized sandboxes and discusses challenges around preserving uniqueness in systems that rely on random or unique values.

## Source excerpt

Lambda Snapstart, and snapshots as a tool for system builders Clones. Yesterday, AWS announced Lambda Snapstart, which uses VM snapshots to reduce cold start times for Lambda functions that need to do a lot of work on start (starting up a language runtime3, loading classes, running static code, initializing caches, etc). Here's a short 1 minute video about it: Or, for a lot more context on Lambda and how we got here5: Snapstart is a super useful capability for Lambda customers. I'm extremely proud of the work the team did to make it a reality. We've been talking about this work for over two years, and working on it for longer. The team did some truly excellent engineering work to make Snapstart a reality. Beyond Snapstart in Lambda, I'm also excited about the underlying technology (microVM snapshots), and the way they give us (as system builders and researchers) a powerful tool for building new kinds of secure and scalable systems. In this post, I talk about some interesting aspects of Snapstart, and how they point to interesting possible areas for research on systems, storage, and even cryptography. What is Snapstart? Without snapstart, the cold start time of a Lambda function is a combination of time time taken to download the function (or container), to start the language runtime3, and to run any initialization code inside the function (including any static code, doing class loading, and even JIT compilation). The cold start time doesn't include MicroVM boot, because that time is not specialized to the application, and can be done in advance. A cold start looks like this1: With snapstart, a snapshot of the microVM is taken after these initialization steps (including all the memory, device state, and CPU registers). This snapshot can be used multiple times (also called cloned), to create multiple sandboxes that are initialized in the same way. Cloning like this has two benefits: The work of initialization is amortized over many sandboxes, rather than being done on