Lambda - using gateway 301 error
- Lenguaje dominante
- Go
- Estrellas
- 651
- Forks
- 75
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
i had added follow sameple code, zip and upload to aws lambda
but its not work for me...
Any suggestion please?
[
](url)

```package main
import (
"fmt"
"log"
"net/http"
"os"
"github.com/apex/gateway"
)
func main() {
http.HandleFunc("/", hello)
log.Fatal(gateway.ListenAndServe(":3000", nil))
}
func hello(w http.ResponseWriter, r *http.Request) {
// example retrieving values from the api gateway proxy request context.
requestContext, ok := gateway.RequestContext(r.Context())
if !ok || requestContext.Authorizer["sub"] == nil {
fmt.Fprint(w, "Hello World from Go")
return
}
userID := requestContext.Authorizer["sub"].(string)
fmt.Fprintf(w, "Hello %s from Go", userID)
}
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.