-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStepFunction_2.json
39 lines (39 loc) · 923 Bytes
/
StepFunction_2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
"StartAt": "Generate Buy/Sell recommendation",
"States": {
"Generate Buy/Sell recommendation": {
"Type": "Task",
"Resource": "arn:aws:lambda:region:14315xxxxxx:function:Lambda_StateMachine",
"HeartbeatSeconds": 60,
"ResultPath": "$.value",
"Next": "Buy or Sell?"
},
"Buy or Sell?": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.value.body",
"StringEquals": "buy",
"Next": "SMS_SNS"
},
{
"Variable": "$.value.body",
"StringEquals": "sell",
"Next": "SMS_SNS"
}
]
},
"SMS_SNS": {
"Type": "Task",
"Resource": "arn:aws:states:::sns:publish",
"Parameters": {
"TopicArn": "arn:aws:sns:region:14315xxxxxxx:newTopic",
"Message.$": "$.value"
},
"Next": "Dead"
},
"Dead": {
"Type": "Succeed"
}
}
}