Skip to content

Instantly share code, notes, and snippets.

@SamanShafigh
Last active June 10, 2018 02:24
Show Gist options
  • Save SamanShafigh/cec340c7a822ca99b8f0bbb147c936b7 to your computer and use it in GitHub Desktop.
Save SamanShafigh/cec340c7a822ca99b8f0bbb147c936b7 to your computer and use it in GitHub Desktop.
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