Skip to content

Commit 9785578

Browse files
authored
Merge pull request #16 from aws-samples/bugfix/#13_2_platform_capabilities
Fix check on existence of platform capabilities
2 parents 1f265af + 6308b6a commit 9785578

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/batch-job-states.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,21 @@
6666
"Choices":
6767
[
6868
{
69-
"Variable": "$.Detail.platformCapabilities[0]",
70-
"StringMatches": "EC2",
71-
"Next": "DynamoDB GetItem Instance Arn"
72-
},
73-
{
74-
"Variable": "$.Detail.platformCapabilities[0]",
75-
"StringMatches": "FARGATE",
69+
"And":
70+
[
71+
{
72+
"Variable": "$.Detail.platformCapabilities[0]",
73+
"IsPresent": true
74+
},
75+
{
76+
"Variable": "$.Detail.platformCapabilities[0]",
77+
"StringMatches": "FARGATE"
78+
}
79+
],
7680
"Next": "DynamoDB PutItem FARGATE"
7781
}
7882
],
79-
"Default": "Success"
83+
"Default": "DynamoDB GetItem Instance Arn"
8084
},
8185
"DynamoDB GetItem Instance Arn":
8286
{
@@ -158,7 +162,7 @@
158162
},
159163
"platform":
160164
{
161-
"S.$": "$$.Execution.Input.detail.platformCapabilities[0]"
165+
"S": "EC2"
162166
},
163167
"logStream":
164168
{

0 commit comments

Comments
 (0)