/aws-lambda-go

Libraries, samples and tools to help Go developers develop AWS Lambda functions.

Primary LanguageGoApache License 2.0Apache-2.0

aws-lambda-go

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

Getting Started

// 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

Deploying your functions

Take a look at the offical documentation for deploying using the AWS CLI, AWS Cloudformation, and AWS SAM

Event Integrations

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.