Slide 8
Slide 8 text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main
import "github.com/aws/aws-lambda-go/lambda"
func init() {
// do some initialization
}
func hello() (string, error) {
return "Hello DevFest!", nil
}
func main() {
lambda.Start(hello)
}
Minimal viable example
// Valid handler function signatures:
// func ()
// func () error
// func (TIn), error
// func () (TOut, error)
// func (context.Context) error
// func (context.Context, TIn) error
// func (context.Context) (TOut, error)
// func (context.Context, TIn) (TOut, error)