`aws-lambda-go/lambda` appears to rewrite and break `AWS_LAMBDA_RUNTIME_API` URI scheme
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by tracing how the github.com/aws/aws-lambda-go/lambda module reads AWS_LAMBDA_RUNTIME_API and constructs the Lambda Runtime API endpoint. Reproduce the issue with http://localhost:2222, then verify that the configured URI is preserved before /2018-06-01/runtime/invocation/next and the other endpoints.
Written by the indexing model from the issue text.
Description
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://.
- Dominant language
- Go
- Stars
- 3.8k
- Forks
- 578
- Avg merge
- 16h 56m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-go
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
aws/aws-lambda-go#634 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws/aws-lambda-go#597 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
aws/aws-lambda-go#556 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
aws/aws-lambda-go#610 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
aws/aws-lambda-go#598 ·
All issues in aws/aws-lambda-go
Similar issues
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100