|AWS Lambda Updated With SnapStart|
|Written by Kay Ewbank|
|Monday, 12 December 2022|
Amazon has introduced AWS Lambda SnapStart, a performance optimization that the team says can significantly improve the startup time for applications.
Lambda is a compute service that runs your code in response to events and automatically manages the computing resources for you. AWS Lambda starts running code within milliseconds of an event such as an image upload, in-app activity, website click, or output from a connected device.
You can also use it to create back-end services where resources such as an Amazon S3 bucket, DynamoDB table, or Kinesis stream are triggered based on custom requests to manage changes in application data. For instance, your code can watch for a pattern, such as an address, and trigger an alert.
The new SnapStart service was announced at the recent AWS re:Invent 2022, and for the moment is limited to Lambda SnapStart for Java. The AWS team say it provides up to ten times faster function startup times for latency-sensitive Java applications.
The problem SnapStart is designed to solve is that of initialization. For a Lambda function, this involves downloading the function’s code, starting the runtime and any external dependencies, and running the function’s initialization code. Ordinarily, for a Lambda function, this initialization happens every time your application scales up to create a new execution environment.
With SnapStart, the function’s initialization is done ahead of time when you publish a function version. Lambda takes a Firecracker microVM snapshot of the memory and disk state of the initialized execution environment, encrypts the snapshot, and caches it for low-latency access. When your application starts up and scales to handle traffic, Lambda resumes new execution environments from the cached snapshot instead of initializing them from scratch, improving startup performance.
To maintain security, Lambda’s included versions of Amazon Linux 2, OpenSSL, and java.security.SecureRandom all automatically re-initialize their randomness and secrets after a SnapStart.
Lambda also offers a SnapStart scanning tool that checks for certain categories of code that assume uniqueness, so customers can make changes as required. The SnapStart scanning tool is an open-source SpotBugs plugin that runs static analysis against a set of rules and reports “potential SnapStart bugs”.
or email your comment to: email@example.com
|Last Updated ( Monday, 12 December 2022 )|