-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjobSample.json
More file actions
51 lines (51 loc) · 1.52 KB
/
jobSample.json
File metadata and controls
51 lines (51 loc) · 1.52 KB
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
{
"Comment": "An example of the Amazon States Language that runs an AWS Batch job and monitors the job until it completes.",
"StartAt": "Submit Job",
"States": {
"Submit Job": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:880053059144:function:StepFunctionsSample-JobStatusPol-SubmitJobFunction-1F9CICQEA7TUK",
"ResultPath": "$.guid",
"Next": "Wait X Seconds"
},
"Wait X Seconds": {
"Type": "Wait",
"SecondsPath": "$.wait_time",
"Next": "Get Job Status"
},
"Get Job Status": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:880053059144:function:StepFunctionsSample-JobStatusPoll-CheckJobFunction-5G0EQLL1R800",
"Next": "Job Complete?",
"InputPath": "$.guid",
"ResultPath": "$.status"
},
"Job Complete?": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.status",
"StringEquals": "FAILED",
"Next": "Job Failed"
},
{
"Variable": "$.status",
"StringEquals": "SUCCEEDED",
"Next": "Get Final Job Status"
}
],
"Default": "Wait X Seconds"
},
"Job Failed": {
"Type": "Fail",
"Cause": "AWS Batch Job Failed",
"Error": "DescribeJob returned FAILED"
},
"Get Final Job Status": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:880053059144:function:StepFunctionsSample-JobStatusPoll-CheckJobFunction-5G0EQLL1R800",
"InputPath": "$.guid",
"End": true
}
}
}