Activating and managing Lambda SnapStart
To use SnapStart, activate SnapStart on a new or existing Lambda function. Then, publish and invoke a function version.
Topics
Activating SnapStart (console)
To activate SnapStart for a function
Open the Functions page
of the Lambda console. -
Choose the name of a function.
-
Choose Configuration, and then choose General configuration.
-
On the General configuration pane, choose Edit.
-
On the Edit basic settings page, for SnapStart, choose Published versions.
-
Choose Save.
-
Publish a function version. Lambda initializes your code, creates a snapshot of the initialized execution environment, and then caches the snapshot for low-latency access.
Activating SnapStart (AWS CLI)
To activate SnapStart for an existing function
-
Update the function configuration by running the update-function-configuration
command with the --snap-start option. aws lambda update-function-configuration \ --function-name my-function \ --snap-start ApplyOn=PublishedVersions -
Publish a function version with the publish-version
command. aws lambda publish-version \ --function-name my-function -
Confirm that SnapStart is activated for the function version by running the get-function-configuration
command and specifying the version number. The following example specifies version 1.