Created
June 10, 2018 02:24
-
-
Save SamanShafigh/a7f848f24cd808c14605b7a407e7a10f to your computer and use it in GitHub Desktop.
lambda-f4.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 ( | |
"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 4th 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