-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Allow usage of additional runtimes with the Lambda SnapStart feature enabled #12006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rrently does (not only the officially supported ones)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting insights that SnapStart is allowed for all runtimes 💡
def test_snapstart_update_function_configuration( | ||
self, create_lambda_function, snapshot, aws_client, runtime | ||
self, multiruntime_lambda, snapshot, aws_client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiruntime_lambda
🚀
"EphemeralStorage": { | ||
"Size": 512 | ||
}, | ||
"FunctionArn": "arn:<partition>:lambda:<region>:111111111111:function:<function-name:1>", | ||
"FunctionName": "<function-name:1>", | ||
"Handler": "cloud.localstack.sample.LambdaHandlerWithLib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 🥳
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 30m 1s ⏱️ - 21m 55s Results for commit b9ad6eb. ± Comparison against base commit eaf1a15. This pull request removes 949 and adds 35 tests. Note that renamed tests count towards both.
|
Motivation
Recently, AWS announced support for additional runtimes for using SnapStart: https://aws.amazon.com/blogs/aws/aws-lambda-snapstart-for-python-and-net-functions-is-now-generally-available/
However, while investigating this change, it seems that over the API the feature is available for all runtimes, not just the announced ones.
Whether this is a temporary error, or a hint that additional runtimes could get supported in the future, I removed the runtime validation for snapstart creation and updates, and added aws-validated tests for all runtimes to show it is indeed possible to create them.
I did some more investigation, and it seems like SnapStart is even (somewhat) functioning, at least an initial initialization of the function potentially takes place (if you misconfigure the function, it errors out immediately, it does not do so without snapstart enabled).
Changes