Skip to content

Commit f26bfe9

Browse files
authored
feat(stepfunctions-tasks): Node.js 18.x runtime for EvaluateExpression (#25002)
Also compare the name instead of the runtime so specifying the `runtime` with `new Runtime()` also works. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a3e7c3e commit f26bfe9

12 files changed

+765
-128
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "31.0.0",
3+
"files": {
4+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5+
"source": {
6+
"path": "EvaluateExpressionIntegDefaultTestDeployAssert03097648.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Parameters": {
3+
"BootstrapVersion": {
4+
"Type": "AWS::SSM::Parameter::Value<String>",
5+
"Default": "/cdk-bootstrap/hnb659fds/version",
6+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7+
}
8+
},
9+
"Rules": {
10+
"CheckBootstrapVersion": {
11+
"Assertions": [
12+
{
13+
"Assert": {
14+
"Fn::Not": [
15+
{
16+
"Fn::Contains": [
17+
[
18+
"1",
19+
"2",
20+
"3",
21+
"4",
22+
"5"
23+
],
24+
{
25+
"Ref": "BootstrapVersion"
26+
}
27+
]
28+
}
29+
]
30+
},
31+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32+
}
33+
]
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "30.0.0",
2+
"version": "31.0.0",
33
"files": {
44
"4a61519d8f4df8206cfaff4e519462aa81beab9213c3642a1353cd679c697638": {
55
"source": {
@@ -14,15 +14,15 @@
1414
}
1515
}
1616
},
17-
"1b823cdecb2e1d73ee259ce6b882ed1b43165a43538d16179b9a70b5488e04d8": {
17+
"da57437b12d804aeee84617a389b3a9d6f1067b93e2e4cccba4c3ef0974b21ca": {
1818
"source": {
19-
"path": "aws-stepfunctions-integ.template.json",
19+
"path": "cdk-sfn-evaluate-expression-integ.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "1b823cdecb2e1d73ee259ce6b882ed1b43165a43538d16179b9a70b5488e04d8.json",
25+
"objectKey": "da57437b12d804aeee84617a389b3a9d6f1067b93e2e4cccba4c3ef0974b21ca.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,112 @@
5353
"Evalda2d1181604e4a4586941a6abd7fe42dServiceRoleED144118"
5454
]
5555
},
56+
"Eval2a430b68eb4b40269232ee39b71c1db8ServiceRole2388DF3C": {
57+
"Type": "AWS::IAM::Role",
58+
"Properties": {
59+
"AssumeRolePolicyDocument": {
60+
"Statement": [
61+
{
62+
"Action": "sts:AssumeRole",
63+
"Effect": "Allow",
64+
"Principal": {
65+
"Service": "lambda.amazonaws.com"
66+
}
67+
}
68+
],
69+
"Version": "2012-10-17"
70+
},
71+
"ManagedPolicyArns": [
72+
{
73+
"Fn::Join": [
74+
"",
75+
[
76+
"arn:",
77+
{
78+
"Ref": "AWS::Partition"
79+
},
80+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
81+
]
82+
]
83+
}
84+
]
85+
}
86+
},
87+
"Eval2a430b68eb4b40269232ee39b71c1db8D6CA9948": {
88+
"Type": "AWS::Lambda::Function",
89+
"Properties": {
90+
"Code": {
91+
"S3Bucket": {
92+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
93+
},
94+
"S3Key": "4a61519d8f4df8206cfaff4e519462aa81beab9213c3642a1353cd679c697638.zip"
95+
},
96+
"Role": {
97+
"Fn::GetAtt": [
98+
"Eval2a430b68eb4b40269232ee39b71c1db8ServiceRole2388DF3C",
99+
"Arn"
100+
]
101+
},
102+
"Handler": "index.handler",
103+
"Runtime": "nodejs16.x"
104+
},
105+
"DependsOn": [
106+
"Eval2a430b68eb4b40269232ee39b71c1db8ServiceRole2388DF3C"
107+
]
108+
},
109+
"Eval078d40d3fb4e4d5394a79c46fc11fe02ServiceRoleDD279E15": {
110+
"Type": "AWS::IAM::Role",
111+
"Properties": {
112+
"AssumeRolePolicyDocument": {
113+
"Statement": [
114+
{
115+
"Action": "sts:AssumeRole",
116+
"Effect": "Allow",
117+
"Principal": {
118+
"Service": "lambda.amazonaws.com"
119+
}
120+
}
121+
],
122+
"Version": "2012-10-17"
123+
},
124+
"ManagedPolicyArns": [
125+
{
126+
"Fn::Join": [
127+
"",
128+
[
129+
"arn:",
130+
{
131+
"Ref": "AWS::Partition"
132+
},
133+
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
134+
]
135+
]
136+
}
137+
]
138+
}
139+
},
140+
"Eval078d40d3fb4e4d5394a79c46fc11fe029D0ED2B4": {
141+
"Type": "AWS::Lambda::Function",
142+
"Properties": {
143+
"Code": {
144+
"S3Bucket": {
145+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
146+
},
147+
"S3Key": "4a61519d8f4df8206cfaff4e519462aa81beab9213c3642a1353cd679c697638.zip"
148+
},
149+
"Role": {
150+
"Fn::GetAtt": [
151+
"Eval078d40d3fb4e4d5394a79c46fc11fe02ServiceRoleDD279E15",
152+
"Arn"
153+
]
154+
},
155+
"Handler": "index.handler",
156+
"Runtime": "nodejs18.x"
157+
},
158+
"DependsOn": [
159+
"Eval078d40d3fb4e4d5394a79c46fc11fe02ServiceRoleDD279E15"
160+
]
161+
},
56162
"StateMachineRoleB840431D": {
57163
"Type": "AWS::IAM::Role",
58164
"Properties": {
@@ -79,12 +185,52 @@
79185
"Action": "lambda:InvokeFunction",
80186
"Effect": "Allow",
81187
"Resource": [
188+
{
189+
"Fn::GetAtt": [
190+
"Eval078d40d3fb4e4d5394a79c46fc11fe029D0ED2B4",
191+
"Arn"
192+
]
193+
},
194+
{
195+
"Fn::GetAtt": [
196+
"Eval2a430b68eb4b40269232ee39b71c1db8D6CA9948",
197+
"Arn"
198+
]
199+
},
82200
{
83201
"Fn::GetAtt": [
84202
"Evalda2d1181604e4a4586941a6abd7fe42dF371675D",
85203
"Arn"
86204
]
87205
},
206+
{
207+
"Fn::Join": [
208+
"",
209+
[
210+
{
211+
"Fn::GetAtt": [
212+
"Eval078d40d3fb4e4d5394a79c46fc11fe029D0ED2B4",
213+
"Arn"
214+
]
215+
},
216+
":*"
217+
]
218+
]
219+
},
220+
{
221+
"Fn::Join": [
222+
"",
223+
[
224+
{
225+
"Fn::GetAtt": [
226+
"Eval2a430b68eb4b40269232ee39b71c1db8D6CA9948",
227+
"Arn"
228+
]
229+
},
230+
":*"
231+
]
232+
]
233+
},
88234
{
89235
"Fn::Join": [
90236
"",
@@ -135,14 +281,14 @@
135281
"\",\"Parameters\":{\"expression\":\"$.a + $.b\",\"expressionAttributeValues\":{\"$.a.$\":\"$.a\",\"$.b.$\":\"$.b\"}}},\"Multiply\":{\"Next\":\"Wait\",\"Type\":\"Task\",\"ResultPath\":\"$.d\",\"Resource\":\"",
136282
{
137283
"Fn::GetAtt": [
138-
"Evalda2d1181604e4a4586941a6abd7fe42dF371675D",
284+
"Eval2a430b68eb4b40269232ee39b71c1db8D6CA9948",
139285
"Arn"
140286
]
141287
},
142288
"\",\"Parameters\":{\"expression\":\"$.c * 2\",\"expressionAttributeValues\":{\"$.c.$\":\"$.c\"}}},\"Wait\":{\"Type\":\"Wait\",\"SecondsPath\":\"$.d\",\"Next\":\"Now\"},\"Now\":{\"End\":true,\"Type\":\"Task\",\"ResultPath\":\"$.now\",\"Resource\":\"",
143289
{
144290
"Fn::GetAtt": [
145-
"Evalda2d1181604e4a4586941a6abd7fe42dF371675D",
291+
"Eval078d40d3fb4e4d5394a79c46fc11fe029D0ED2B4",
146292
"Arn"
147293
]
148294
},
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"30.0.0"}
1+
{"version":"31.0.0"}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
2-
"version": "30.0.0",
2+
"version": "31.0.0",
33
"testCases": {
4-
"integ.evaluate-expression": {
4+
"EvaluateExpressionInteg/DefaultTest": {
55
"stacks": [
6-
"aws-stepfunctions-integ"
6+
"cdk-sfn-evaluate-expression-integ"
77
],
8-
"diffAssets": false,
9-
"stackUpdateWorkflow": true
8+
"assertionStack": "EvaluateExpressionInteg/DefaultTest/DeployAssert",
9+
"assertionStackName": "EvaluateExpressionIntegDefaultTestDeployAssert03097648"
1010
}
11-
},
12-
"synthContext": {},
13-
"enableLookups": false
11+
}
1412
}

0 commit comments

Comments
 (0)