Last active
June 10, 2018 02:24
-
-
Save SamanShafigh/cec340c7a822ca99b8f0bbb147c936b7 to your computer and use it in GitHub Desktop.
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 ( | |
"fmt" | |
"github.com/aws/aws-lambda-go/lambda" | |
) | |
// Event defines your lambda input and output data structure, | |
// and of course you can have different input and output data structure | |
type Event struct { | |
Payload string `json:"payload"` | |
} | |
// HandleRequest handles the incomming StepFunction request | |
func HandleRequest(e Event) (Event, error) { | |
return Event{fmt.Sprintf("%s is handled by 1st function", e.Payload)}, nil | |
} | |
func main() { | |
lambda.Start(HandleRequest) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment