At tonight’s re:Invent kickoff keynote, AWS announced a small but important update lambda, the serverless platform that addresses one of the most common problems with the service. If a function isn’t used for a while, Lambda usually shuts down the virtual machine – and despite improvements like faster firecracker microVMs will take a while. Now, with SnapStart, AWS addresses this by taking snapshots of a customer’s Lambda functions and then simply launching them without going through the usual initialization process.
Cold boot times have long been one of the biggest complaints about Lambda – but as Peter DeSantis, AWS’s senior VP of Utility Computing pointed out in today’s keynote, spiky workloads are really what Lambda (and all other serverless platforms) are built for. With its Firecracker microVMs, AWS already improved cold boot times from several seconds to well under a second. Now the company is promising a 90% improvement in cold start times by using Firecracker’s Snapshot function.
This new feature is now available to all Lambda users, although it must be enabled for existing Lambda functions and for now it only works for Java functions that use the Corretto running time.
Once enabled, it will perform a default initialization the first time you run that function. Then it takes an encrypted snapshot of the memory and disk state and caches it for reuse. Then when the function is called again, Lambda will grab the cache and start the function. Cached snapshots are deleted after 14 days of inactivity.
As DeSantis also noted, improvements like this will allow more users to take their workloads to a platform like Lambda. The company already saw this with the launch of Firecracker on Lambda, he explained.