-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMychoice.json
50 lines (47 loc) · 1.14 KB
/
Mychoice.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
{
"Comment": "An example of the Amazon States Language using a choice state.",
"StartAt": "CheckFileSize",
"States": {
"CheckFileSize": {
"Type": "Task",
"Resource": "arn:aws:lambda:eu-west-2:XXXXXXXXXXXX:function:checkSize",
"Next": "ChoiceState"
},
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$",
"NumericGreaterThan": 2000000,
"Next": "ProcessFile"
},
{
"Variable": "$",
"NumericLessThan": 2000000,
"Next": "NotifyFileTooSmall"
}
],
"Default": "DefaultState"
},
"ProcessFile": {
"Type" : "Task",
"Resource": "arn:aws:lambda:eu-west-2:XXXXXXXXXXXX:function:ProcessFile",
"Next": "NotifyOk"
},
"DefaultState": {
"Type": "Fail",
"Error": "DefaultStateError",
"Cause": "No Matches!"
},
"NotifyOk": {
"Type": "Pass",
"Result" : {"Message": "File processed OK"},
"End": true
},
"NotifyFileTooSmall": {
"Type": "Pass",
"Result": {"Message":"File not big enough" },
"End": true
}
}
}