Last active
May 16, 2020 11:51
-
-
Save owfm/d01421b9db70afcbf93ac8549aa19ade 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
# serverless.yml [truncated] | |
# ... | |
States: | |
ProposePromotion: | |
Type: Task | |
Resource: !GetAtt [proposePromotion, Arn] | |
ResultPath: "$.employeeDetails" | |
Next: GetManualReview | |
GetManualReview: | |
Type: Task | |
Resource: arn:aws:states:::lambda:invoke.waitForTaskToken | |
Parameters: | |
FunctionName: ${self:service}-${opt:stage}-storePromotions | |
Payload: | |
employeeDetails.$: "$.employeeDetails" | |
taskToken.$: "$$.Task.Token" | |
ResultPath: "$.decision" | |
Next: PromotionDecision | |
PromotionDecision: | |
Type: Choice | |
Choices: | |
- Variable: "$.decision" | |
StringEquals: approved | |
Next: EmailCongratulations | |
- Variable: "$.decision" | |
StringEquals: rejected | |
Next: EmailCommiserations | |
EmailCongratulations: | |
Type: Task | |
Resource: !GetAtt [emailCongratulations, Arn] | |
End: true | |
EmailCommiserations: | |
Type: Task | |
Resource: !GetAtt [emailCommiserations, Arn] | |
End: true | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment