forked from JulieElkinsAWS/LALabs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
step-function-template.json
82 lines (77 loc) · 1.73 KB
/
step-function-template.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"Comment": "An example of the Amazon States Language using a choice state.",
"StartAt": "SendReminder",
"States": {
"SendReminder": {
"Type": "Wait",
"SecondsPath": "$.waitSeconds",
"Next": "ChoiceState"
},
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.preference",
"StringEquals": "email",
"Next": "EmailReminder"
},
{
"Variable": "$.preference",
"StringEquals": "sms",
"Next": "TextReminder"
},
{
"Variable": "$.preference",
"StringEquals": "both",
"Next": "BothReminders"
}
],
"Default": "DefaultState"
},
"EmailReminder": {
"Type" : "Task",
"Resource": "EMAIL_REMINDER_ARN",
"Next": "NextState"
},
"TextReminder": {
"Type" : "Task",
"Resource": "TEXT_REMINDER_ARN",
"Next": "NextState"
},
"BothReminders": {
"Type": "Parallel",
"Branches": [
{
"StartAt": "EmailReminderPar",
"States": {
"EmailReminderPar": {
"Type" : "Task",
"Resource": "EMAIL_REMINDER_ARN",
"End": true
}
}
},
{
"StartAt": "TextReminderPar",
"States": {
"TextReminderPar": {
"Type" : "Task",
"Resource": "TEXT_REMINDER_ARN",
"End": true
}
}
}
],
"Next": "NextState"
},
"DefaultState": {
"Type": "Fail",
"Error": "DefaultStateError",
"Cause": "No Matches!"
},
"NextState": {
"Type": "Pass",
"End": true
}
}
}