aws-lambda-go

module
v0.0.0-...-6c0fb1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2023 License: Apache-2.0

README

AWS Lambda for Go

An experiment reducing the go lambda runtime to a single function signature

Getting Started

// main.go
package main

import (
	"context"

	"github.com/Luke-Davies/aws-lambda-go/lambda"
)

type Request struct {
	Message string
}

type Response struct {
	Message string
}

func hello(ctx context.Context, event Request) (Response, error) {
	return Response{ Message: "Hello λ!" }, nil
}

func main() {
	// Make the handler available for Remote Procedure Call by AWS Lambda
	lambda.StartHandlerFunc(hello)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL