You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lambda-entrypoint.sh looks like this (taken from public.ecr.aws/lambda/ruby:3.3-x86_64):
#!/bin/sh# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.if [ $#-ne 1 ];thenecho"entrypoint requires the handler name to be the first argument"1>&2exit 142
fiexport _HANDLER="$1"
RUNTIME_ENTRYPOINT=/var/runtime/bootstrap
if [ -z"${AWS_LAMBDA_RUNTIME_API}" ];thenexec /usr/local/bin/aws-lambda-rie $RUNTIME_ENTRYPOINTelseexec$RUNTIME_ENTRYPOINTfi
The command line parameters passed to aws-lambda-rie are hard coded, so there's no easy way to adjust those parameters. At the moment I need to create a docker image with a patched lambda-entrypoint.sh which is a lot more work than setting an environment variable.
Activity
valerena commentedon May 2, 2024
Hi. There is already a parameter that you can pass called
--runtime-interface-emulator-address
(Definition and Example usage in the tests)
Is this what you're looking for?
shaicoleman commentedon May 2, 2024
The
lambda-entrypoint.sh
looks like this (taken frompublic.ecr.aws/lambda/ruby:3.3-x86_64
):The command line parameters passed to
aws-lambda-rie
are hard coded, so there's no easy way to adjust those parameters. At the moment I need to create a docker image with a patchedlambda-entrypoint.sh
which is a lot more work than setting an environment variable.valerena commentedon May 2, 2024
Ok. I understand what's the use case now.
If you want to make a contribution, we would be happy to review and merge. It should be something similar to how the
logLevel
is handled that can be passed as a parameter or as an env var: https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/develop/cmd/aws-lambda-rie/main.go#L44-L48 (plus tests)In any case, we'll take this into consideration and see when we can take this.
shaicoleman commentedon Jul 23, 2024
@valerena , could you look into adding it?
valerena commentedon Aug 1, 2024
Hi @shaicoleman. I don't have enough bandwidth to submit the changes myself at the moment, but I could help reviewing code if you want to send a PR.