-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstepfunc.json
42 lines (42 loc) · 1.16 KB
/
stepfunc.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
{
"Comment": "Launch Spot Instances or Ondemand Instances",
"StartAt": "RequestSpotInstances",
"States": {
"RequestSpotInstances": {
"Type": "Task",
"Resource": "arn:aws:lambda:ap-northeast-1:xxxxxxxxxxxx:function:RequestSpotInstances",
"Next": "waitBidding"
},
"waitBidding": {
"Type": "Wait",
"Seconds": 60,
"Next": "GetBiddingResult"
},
"GetBiddingResult": {
"Type": "Task",
"Resource": "arn:aws:lambda:ap-northeast-1:xxxxxxxxxxxx:function:GetBiddingResult",
"Next": "CheckResult"
},
"CheckResult": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.LaunchedInstances",
"StringEquals": "0",
"Next": "RequestOndemandInstances"
}
],
"Default": "SendNotification"
},
"RequestOndemandInstances": {
"Type": "Task",
"Resource": "arn:aws:lambda:ap-northeast-1:xxxxxxxxxxxx:function:RequestOndemandInstances",
"Next": "SendNotification"
},
"SendNotification": {
"Type": "Task",
"Resource": "arn:aws:lambda:ap-northeast-1:xxxxxxxxxxxx:function:SendNotification",
"End": true
}
}
}