Skip to content

Instantly share code, notes, and snippets.

@SamanShafigh
Created June 10, 2018 02:23
Show Gist options
  • Save SamanShafigh/06155a64fa34e9de0b592eeeee91a66a to your computer and use it in GitHub Desktop.
Save SamanShafigh/06155a64fa34e9de0b592eeeee91a66a 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/output data structure,
type Event struct {
Payload string `json:"payload"`
Status int `json:"status"`
}
// HandleRequest handles the incomming StepFunction request
func HandleRequest(e Event) (Event, error) {
return Event{
Payload: fmt.Sprintf("%s is handled by 3rd function", e.Payload),
Status: e.Status,
}, nil
}
func main() {
lambda.Start(HandleRequest)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment