Conversation
joe4dev
commented
Mar 8, 2023
| LAMBDA_RUNTIME_INIT_URL = "https://github.com/localstack/lambda-runtime-init/releases/download/{version}/aws-lambda-rie-{arch}" | ||
|
|
||
| LAMBDA_RUNTIME_DEFAULT_VERSION = "v0.1.11-pre" | ||
| LAMBDA_RUNTIME_DEFAULT_VERSION = "v0.1.12-pre" |
Member
Author
There was a problem hiding this comment.
This is the key change adopting the new RIE release including https://github.com/localstack/lambda-runtime-init/pull/13/files
a5a5687 to
f171537
Compare
joe4dev
commented
Mar 9, 2023
| # LOCALSTACK_USER conditionally added below | ||
| } | ||
| # Conditionally added environment variables | ||
| # TODO: Can handler be None? |
Member
Author
There was a problem hiding this comment.
Right, at API level Handler is only required for zip lambdas. I added a clarifying comment.
The _HANDLER environment variable is then populated at runtime (e.g., by RIE). Examples:
/applicationfor the aws-samples app lambda-from-containerapp.handlerin our ext testtests.integration.test_lambda.TestLambdaContainer.test_lambda_from_image
Sidenote: CDK validates it TypeError: Function.__init__() missing 1 required keyword-only argument: 'handler' (see example here)
dominikschubert
approved these changes
Mar 9, 2023
Member
dominikschubert
left a comment
There was a problem hiding this comment.
LGTM 🚀
Good idea to reorder the env variables by context, rather than purely alphabetically 👍
f171537 to
a44792e
Compare
Skip dropping privileges in debug mode
a44792e to
8a3301b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves lambda runtime parity related to user and environment variables:
sbx_user1051user for runtime parity and drop root privileges.LAMBDA_INIT_USERflag and populate it automatically to overcome RIE debugging limitation when dropping privilegesRelated to localstack/lambda-runtime-init#13
Addresses #7722