Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 651 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 651 Bytes

GoDoc

aws-lambda-http

aws-lambda-http provides a wrapper for http.Handler and http.HandlerFunc that allows them to be used by lambda without any changes.

Example

package main

import (
	"io"
	"net/http"

	"github.com/aws/aws-lambda-go/lambda"
	"github.com/savaki/aws-lambda-http/lambdahttp"
)

func hello(w http.ResponseWriter, req *http.Request) {
	io.WriteString(w, "hello world")
}

func main() {
	lambda.Start(lambdahttp.WrapF(hello))
}