https://github.com/artyom/alb
Use http.Handler inside AWS Lambda running behind AWS ALB
https://github.com/artyom/alb
aws-lambda
Last synced: about 1 month ago
JSON representation
Use http.Handler inside AWS Lambda running behind AWS ALB
- Host: GitHub
- URL: https://github.com/artyom/alb
- Owner: artyom
- License: mit
- Created: 2018-12-05T06:02:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-28T22:12:09.000Z (about 5 years ago)
- Last Synced: 2025-01-14T07:53:55.267Z (over 1 year ago)
- Topics: aws-lambda
- Language: Go
- Homepage: https://pkg.go.dev/github.com/artyom/alb
- Size: 5.86 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README
- License: LICENSE.txt
Awesome Lists containing this project
README
Package alb provides adapter enabling usage of http.Handler inside AWS
Lambda running behind AWS ALB as described here:
https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html
Usage example:
package main
import (
"fmt"
"net/http"
"github.com/artyom/alb"
"github.com/aws/aws-lambda-go/lambda"
)
func main() { lambda.Start(alb.Handler(http.HandlerFunc(hello))) }
func hello(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello from AWS Lambda behind ALB")
}
See documentation at https://godoc.org/github.com/artyom/alb