Skip to content
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

aws-lambda-go/lambda appears to rewrite and break AWS_LAMBDA_RUNTIME_API URI scheme #492

Open
ryanblock opened this issue Mar 27, 2023 · 0 comments

Comments

@ryanblock
Copy link

Description of issue

When running a Go handler with the Lambda module (github.com/aws/aws-lambda-go/lambda), setting the env var of AWS_LAMBDA_RUNTIME_API to http://localhost:2222 results in the following error:

2023/03/27 20:44:58 failed to get the next invoke: Get "http://http//localhost:2222/2018-06-01/runtime/invocation/next": dial tcp: lookup http: no such host

It appears this module does not want a URI scheme (specifically: http://) specified, which appears to be at odds with how other official AWS libraries that make use of the Lambda Runtime API (and AWS_LAMBDA_RUNTIME_API env var) seem to work.

Expected result

Whatever is found in the AWS_LAMBDA_RUNTIME_API env var is exactly the URI that should be used preceding the /2018-06-01/runtime/invocation/next (and other) endpoint(s).

Steps to reproduce

Run a module that imports github.com/aws/aws-lambda-go/lambda and ensure that your AWS_LAMBDA_RUNTIME_API starts with http://.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant