Libraries, samples and tools to help Go developers develop AWS Lambda functions.
To learn more about writing AWS Lambda functions in Go, go to the offical documentation
// main.go
package main
import (
"github.com/aws/aws-lambda-go/lambda"
)
func hello() (string, error) {
return "Hello ƛ!", nil
}
func main() {
// Make the handler available for Remote Procedure Call by AWS Lambda
lambda.Start(hello)
}
# Remember to build your handler executable for linux!
GOOS=linux go build -o main main.go
Take a look at the offical documentation for deploying using the AWS CLI, AWS Cloudformation, and AWS SAM
If you're using AWS Lambda with an AWS event source, you can use one of the event models for your request type.
Check out the docs for detailed walkthroughs.