Created
August 21, 2018 21:50
-
-
Save takedajs/696fa2eed43322de743787a1088bd086 to your computer and use it in GitHub Desktop.
aws_lambda_hello.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/aws/aws-lambda-go/lambda" | |
) | |
type MyEvent struct { | |
Name string `json:"name"` | |
} | |
func hello(ctx context.Context, name MyEvent) (string, error) { | |
return fmt.Sprintf("Hello %s!", name.Name), nil | |
} | |
func main() { | |
lambda.Start(hello) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment