Created
June 10, 2018 02:23
-
-
Save SamanShafigh/06155a64fa34e9de0b592eeeee91a66a 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/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