`aws-lambda-go/lambda` appears to rewrite and break `AWS_LAMBDA_RUNTIME_API` URI scheme
- Lingua principale
- Go
- Stelle
- 3.8k
- Fork
- 578
- Merge medio
- 8h 18m
- PR unite (30g)
- 1
Descrizione
**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://`.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia tracciando il modo in cui il modulo github.com/aws/aws-lambda-go/lambda legge AWS_LAMBDA_RUNTIME_API e costruisce l'endpoint della Lambda Runtime API. Riproduci il problema con http://localhost:2222, quindi verifica che l'URI configurata venga preservata prima di /2018-06-01/runtime/invocation/next e degli altri endpoint.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, go
- Ambito
- backend, cloud
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100