@aws-solutions-constructs/aws-iot-lambda 2.51.0 → 2.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +49 -4
  3. package/integ.config.json +7 -0
  4. package/lib/index.js +1 -1
  5. package/package.json +9 -8
  6. package/test/integ.iotlam-iot-lambda-new-func.js +5 -2
  7. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/asset.42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c/index.js +10 -0
  8. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/cdk.out +1 -0
  9. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/integ.json +12 -0
  10. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.assets.json +32 -0
  11. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.template.json +217 -0
  12. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlamiotlambdanewfuncIntegDefaultTestDeployAssert4A7D5BFD.assets.json +19 -0
  13. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlamiotlambdanewfuncIntegDefaultTestDeployAssert4A7D5BFD.template.json +36 -0
  14. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/manifest.json +137 -0
  15. package/test/integ.iotlam-iot-lambda-new-func.js.snapshot/tree.json +362 -0
  16. package/test/integ.iotlam-iot-lambda-use-existing-func.js +5 -2
  17. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/asset.42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c/index.js +10 -0
  18. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/cdk.out +1 -0
  19. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/integ.json +12 -0
  20. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.assets.json +32 -0
  21. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.template.json +217 -0
  22. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlamiotlambdauseexistingfuncIntegDefaultTestDeployAssert1472E245.assets.json +19 -0
  23. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlamiotlambdauseexistingfuncIntegDefaultTestDeployAssert1472E245.template.json +36 -0
  24. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/manifest.json +137 -0
  25. package/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/tree.json +362 -0
  26. package/test/integ.iotlam-iot-lambda-new-func.expected.json +0 -217
  27. package/test/integ.iotlam-iot-lambda-use-existing-func.expected.json +0 -217
@@ -0,0 +1,362 @@
1
+ {
2
+ "version": "tree-0.1",
3
+ "tree": {
4
+ "id": "App",
5
+ "path": "",
6
+ "children": {
7
+ "iotlam-iot-lambda-new-func": {
8
+ "id": "iotlam-iot-lambda-new-func",
9
+ "path": "iotlam-iot-lambda-new-func",
10
+ "children": {
11
+ "test-iot-lambda-integration": {
12
+ "id": "test-iot-lambda-integration",
13
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration",
14
+ "children": {
15
+ "LambdaFunctionServiceRole": {
16
+ "id": "LambdaFunctionServiceRole",
17
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunctionServiceRole",
18
+ "children": {
19
+ "ImportLambdaFunctionServiceRole": {
20
+ "id": "ImportLambdaFunctionServiceRole",
21
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole",
22
+ "constructInfo": {
23
+ "fqn": "aws-cdk-lib.Resource",
24
+ "version": "2.118.0"
25
+ }
26
+ },
27
+ "Resource": {
28
+ "id": "Resource",
29
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunctionServiceRole/Resource",
30
+ "attributes": {
31
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
32
+ "aws:cdk:cloudformation:props": {
33
+ "assumeRolePolicyDocument": {
34
+ "Statement": [
35
+ {
36
+ "Action": "sts:AssumeRole",
37
+ "Effect": "Allow",
38
+ "Principal": {
39
+ "Service": "lambda.amazonaws.com"
40
+ }
41
+ }
42
+ ],
43
+ "Version": "2012-10-17"
44
+ },
45
+ "policies": [
46
+ {
47
+ "policyName": "LambdaFunctionServiceRolePolicy",
48
+ "policyDocument": {
49
+ "Statement": [
50
+ {
51
+ "Action": [
52
+ "logs:CreateLogGroup",
53
+ "logs:CreateLogStream",
54
+ "logs:PutLogEvents"
55
+ ],
56
+ "Effect": "Allow",
57
+ "Resource": {
58
+ "Fn::Join": [
59
+ "",
60
+ [
61
+ "arn:",
62
+ {
63
+ "Ref": "AWS::Partition"
64
+ },
65
+ ":logs:",
66
+ {
67
+ "Ref": "AWS::Region"
68
+ },
69
+ ":",
70
+ {
71
+ "Ref": "AWS::AccountId"
72
+ },
73
+ ":log-group:/aws/lambda/*"
74
+ ]
75
+ ]
76
+ }
77
+ }
78
+ ],
79
+ "Version": "2012-10-17"
80
+ }
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ "constructInfo": {
86
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
87
+ "version": "2.118.0"
88
+ }
89
+ },
90
+ "DefaultPolicy": {
91
+ "id": "DefaultPolicy",
92
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunctionServiceRole/DefaultPolicy",
93
+ "children": {
94
+ "Resource": {
95
+ "id": "Resource",
96
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunctionServiceRole/DefaultPolicy/Resource",
97
+ "attributes": {
98
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
99
+ "aws:cdk:cloudformation:props": {
100
+ "policyDocument": {
101
+ "Statement": [
102
+ {
103
+ "Action": [
104
+ "xray:PutTelemetryRecords",
105
+ "xray:PutTraceSegments"
106
+ ],
107
+ "Effect": "Allow",
108
+ "Resource": "*"
109
+ }
110
+ ],
111
+ "Version": "2012-10-17"
112
+ },
113
+ "policyName": "testiotlambdaintegrationLambdaFunctionServiceRoleDefaultPolicy0FB2AE4D",
114
+ "roles": [
115
+ {
116
+ "Ref": "testiotlambdaintegrationLambdaFunctionServiceRole27C3EE41"
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ "constructInfo": {
122
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
123
+ "version": "2.118.0"
124
+ }
125
+ }
126
+ },
127
+ "constructInfo": {
128
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
129
+ "version": "2.118.0"
130
+ }
131
+ }
132
+ },
133
+ "constructInfo": {
134
+ "fqn": "aws-cdk-lib.aws_iam.Role",
135
+ "version": "2.118.0"
136
+ }
137
+ },
138
+ "LambdaFunction": {
139
+ "id": "LambdaFunction",
140
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction",
141
+ "children": {
142
+ "Code": {
143
+ "id": "Code",
144
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/Code",
145
+ "children": {
146
+ "Stage": {
147
+ "id": "Stage",
148
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/Code/Stage",
149
+ "constructInfo": {
150
+ "fqn": "aws-cdk-lib.AssetStaging",
151
+ "version": "2.118.0"
152
+ }
153
+ },
154
+ "AssetBucket": {
155
+ "id": "AssetBucket",
156
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/Code/AssetBucket",
157
+ "constructInfo": {
158
+ "fqn": "aws-cdk-lib.aws_s3.BucketBase",
159
+ "version": "2.118.0"
160
+ }
161
+ }
162
+ },
163
+ "constructInfo": {
164
+ "fqn": "aws-cdk-lib.aws_s3_assets.Asset",
165
+ "version": "2.118.0"
166
+ }
167
+ },
168
+ "Resource": {
169
+ "id": "Resource",
170
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/Resource",
171
+ "attributes": {
172
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
173
+ "aws:cdk:cloudformation:props": {
174
+ "code": {
175
+ "s3Bucket": {
176
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
177
+ },
178
+ "s3Key": "42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c.zip"
179
+ },
180
+ "environment": {
181
+ "variables": {
182
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
183
+ }
184
+ },
185
+ "handler": "index.handler",
186
+ "role": {
187
+ "Fn::GetAtt": [
188
+ "testiotlambdaintegrationLambdaFunctionServiceRole27C3EE41",
189
+ "Arn"
190
+ ]
191
+ },
192
+ "runtime": "nodejs16.x",
193
+ "tracingConfig": {
194
+ "mode": "Active"
195
+ }
196
+ }
197
+ },
198
+ "constructInfo": {
199
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
200
+ "version": "2.118.0"
201
+ }
202
+ },
203
+ "AwsIotLambdaInvokePermission-1": {
204
+ "id": "AwsIotLambdaInvokePermission-1",
205
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/AwsIotLambdaInvokePermission-1",
206
+ "attributes": {
207
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Permission",
208
+ "aws:cdk:cloudformation:props": {
209
+ "action": "lambda:InvokeFunction",
210
+ "functionName": {
211
+ "Fn::GetAtt": [
212
+ "testiotlambdaintegrationLambdaFunctionC5329DBA",
213
+ "Arn"
214
+ ]
215
+ },
216
+ "principal": "iot.amazonaws.com",
217
+ "sourceArn": {
218
+ "Fn::GetAtt": [
219
+ "testiotlambdaintegrationIotTopic18B6A735",
220
+ "Arn"
221
+ ]
222
+ }
223
+ }
224
+ },
225
+ "constructInfo": {
226
+ "fqn": "aws-cdk-lib.aws_lambda.CfnPermission",
227
+ "version": "2.118.0"
228
+ }
229
+ }
230
+ },
231
+ "constructInfo": {
232
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
233
+ "version": "2.118.0"
234
+ }
235
+ },
236
+ "IotTopic": {
237
+ "id": "IotTopic",
238
+ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/IotTopic",
239
+ "attributes": {
240
+ "aws:cdk:cloudformation:type": "AWS::IoT::TopicRule",
241
+ "aws:cdk:cloudformation:props": {
242
+ "topicRulePayload": {
243
+ "ruleDisabled": false,
244
+ "actions": [
245
+ {
246
+ "lambda": {
247
+ "functionArn": {
248
+ "Fn::GetAtt": [
249
+ "testiotlambdaintegrationLambdaFunctionC5329DBA",
250
+ "Arn"
251
+ ]
252
+ }
253
+ }
254
+ }
255
+ ],
256
+ "sql": "SELECT * FROM 'connectedcar/dtc/#'",
257
+ "description": "Processing of DTC messages from the AWS Connected Vehicle Solution."
258
+ }
259
+ }
260
+ },
261
+ "constructInfo": {
262
+ "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule",
263
+ "version": "2.118.0"
264
+ }
265
+ }
266
+ },
267
+ "constructInfo": {
268
+ "fqn": "@aws-solutions-constructs/aws-iot-lambda.IotToLambda",
269
+ "version": "2.50.0"
270
+ }
271
+ },
272
+ "Integ": {
273
+ "id": "Integ",
274
+ "path": "iotlam-iot-lambda-new-func/Integ",
275
+ "children": {
276
+ "DefaultTest": {
277
+ "id": "DefaultTest",
278
+ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest",
279
+ "children": {
280
+ "Default": {
281
+ "id": "Default",
282
+ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/Default",
283
+ "constructInfo": {
284
+ "fqn": "constructs.Construct",
285
+ "version": "10.0.0"
286
+ }
287
+ },
288
+ "DeployAssert": {
289
+ "id": "DeployAssert",
290
+ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/DeployAssert",
291
+ "children": {
292
+ "BootstrapVersion": {
293
+ "id": "BootstrapVersion",
294
+ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/DeployAssert/BootstrapVersion",
295
+ "constructInfo": {
296
+ "fqn": "aws-cdk-lib.CfnParameter",
297
+ "version": "2.118.0"
298
+ }
299
+ },
300
+ "CheckBootstrapVersion": {
301
+ "id": "CheckBootstrapVersion",
302
+ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
303
+ "constructInfo": {
304
+ "fqn": "aws-cdk-lib.CfnRule",
305
+ "version": "2.118.0"
306
+ }
307
+ }
308
+ },
309
+ "constructInfo": {
310
+ "fqn": "aws-cdk-lib.Stack",
311
+ "version": "2.118.0"
312
+ }
313
+ }
314
+ },
315
+ "constructInfo": {
316
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
317
+ "version": "2.118.0-alpha.0"
318
+ }
319
+ }
320
+ },
321
+ "constructInfo": {
322
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
323
+ "version": "2.118.0-alpha.0"
324
+ }
325
+ },
326
+ "BootstrapVersion": {
327
+ "id": "BootstrapVersion",
328
+ "path": "iotlam-iot-lambda-new-func/BootstrapVersion",
329
+ "constructInfo": {
330
+ "fqn": "aws-cdk-lib.CfnParameter",
331
+ "version": "2.118.0"
332
+ }
333
+ },
334
+ "CheckBootstrapVersion": {
335
+ "id": "CheckBootstrapVersion",
336
+ "path": "iotlam-iot-lambda-new-func/CheckBootstrapVersion",
337
+ "constructInfo": {
338
+ "fqn": "aws-cdk-lib.CfnRule",
339
+ "version": "2.118.0"
340
+ }
341
+ }
342
+ },
343
+ "constructInfo": {
344
+ "fqn": "aws-cdk-lib.Stack",
345
+ "version": "2.118.0"
346
+ }
347
+ },
348
+ "Tree": {
349
+ "id": "Tree",
350
+ "path": "Tree",
351
+ "constructInfo": {
352
+ "fqn": "constructs.Construct",
353
+ "version": "10.0.0"
354
+ }
355
+ }
356
+ },
357
+ "constructInfo": {
358
+ "fqn": "aws-cdk-lib.App",
359
+ "version": "2.118.0"
360
+ }
361
+ }
362
+ }
@@ -18,6 +18,7 @@ const lib_1 = require("../lib");
18
18
  const lambda = require("aws-cdk-lib/aws-lambda");
19
19
  const defaults = require("@aws-solutions-constructs/core");
20
20
  const core_1 = require("@aws-solutions-constructs/core");
21
+ const integ_tests_alpha_1 = require("@aws-cdk/integ-tests-alpha");
21
22
  // Setup
22
23
  const app = new aws_cdk_lib_1.App();
23
24
  const stack = new aws_cdk_lib_1.Stack(app, core_1.generateIntegStackName(__filename));
@@ -41,5 +42,7 @@ const props = {
41
42
  };
42
43
  new lib_1.IotToLambda(stack, 'test-iot-lambda-integration', props);
43
44
  // Synth
44
- app.synth();
45
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcuaW90bGFtLWlvdC1sYW1iZGEtdXNlLWV4aXN0aW5nLWZ1bmMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnRlZy5pb3RsYW0taW90LWxhbWJkYS11c2UtZXhpc3RpbmctZnVuYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7O0dBV0c7O0FBRUgsZ0JBQWdCO0FBQ2hCLDZDQUF5QztBQUN6QyxnQ0FBdUQ7QUFDdkQsaURBQWlEO0FBQ2pELDJEQUEyRDtBQUMzRCx5REFBd0U7QUFFeEUsUUFBUTtBQUNSLE1BQU0sR0FBRyxHQUFHLElBQUksaUJBQUcsRUFBRSxDQUFDO0FBQ3RCLE1BQU0sS0FBSyxHQUFHLElBQUksbUJBQUssQ0FBQyxHQUFHLEVBQUUsNkJBQXNCLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztBQUVqRSxNQUFNLG1CQUFtQixHQUFHO0lBQzFCLE9BQU8sRUFBRSxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVc7SUFDbkMsT0FBTyxFQUFFLGVBQW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JkYS5Db2RlLmZyb21Bc3NldChgJHtfX2Rpcm5hbWV9L2xhbWJkYWApXG59O1xuXG5jb25zdCBmdW5jID0gZGVmYXVsdHMuZGVwbG95TGFtYmRhRnVuY3Rpb24oc3RhY2ssIGxhbWJkYUZ1bmN0aW9uUHJvcHMpO1xuXG4vLyBEZWZpbml0aW9uc1xuY29uc3QgcHJvcHM6IElvdFRvTGFtYmRhUHJvcHMgPSB7XG4gIGV4aXN0aW5nTGFtYmRhT2JqOiBmdW5jLFxuICBpb3RUb3BpY1J1bGVQcm9wczoge1xuICAgIHRvcGljUnVsZVBheWxvYWQ6IHtcbiAgICAgIHJ1bGVEaXNhYmxlZDogZmFsc2UsXG4gICAgICBkZXNjcmlwdGlvbjogXCJQcm9jZXNzaW5nIG9mIERUQyBtZXNzYWdlcyBmcm9tIHRoZSBBV1MgQ29ubmVjdGVkIFZlaGljbGUgU29sdXRpb24uXCIsXG4gICAgICBzcWw6IFwiU0VMRUNUICogRlJPTSAnY29ubmVjdGVkY2FyL2R0Yy8jJ1wiLFxuICAgICAgYWN0aW9uczogW11cbiAgICB9XG4gIH1cbn07XG5cbm5ldyBJb3RUb0xhbWJkYShzdGFjaywgJ3Rlc3QtaW90LWxhbWJkYS1pbnRlZ3JhdGlvbicsIHByb3BzKTtcblxuLy8gU3ludGhcbmFwcC5zeW50aCgpO1xuIl19
45
+ new integ_tests_alpha_1.IntegTest(stack, 'Integ', { testCases: [
46
+ stack
47
+ ] });
48
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcuaW90bGFtLWlvdC1sYW1iZGEtdXNlLWV4aXN0aW5nLWZ1bmMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnRlZy5pb3RsYW0taW90LWxhbWJkYS11c2UtZXhpc3RpbmctZnVuYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7Ozs7O0dBV0c7O0FB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FxuICAgICAgc3FsOiBcIlNFTEVDVCAqIEZST00gJ2Nvbm5lY3RlZGNhci9kdGMvIydcIixcbiAgICAgIGFjdGlvbnM6IFtdXG4gICAgfVxuICB9XG59O1xuXG5uZXcgSW90VG9MYW1iZGEoc3RhY2ssICd0ZXN0LWlvdC1sYW1iZGEtaW50ZWdyYXRpb24nLCBwcm9wcyk7XG5cbi8vIFN5bnRoXG5uZXcgSW50ZWdUZXN0KHN0YWNrLCAnSW50ZWcnLCB7IHRlc3RDYXNlczogW1xuICBzdGFja1xuXSB9KTtcbiJdfQ==
@@ -0,0 +1,10 @@
1
+ console.log('Loading function');
2
+
3
+ exports.handler = async (event, context) => {
4
+ console.log('Received event:', JSON.stringify(event, null, 2));
5
+     return {
6
+       statusCode: 200,
7
+       headers: { 'Content-Type': 'text/plain' },
8
+       body: `Hello from Project Vesper! You've hit ${event.path}\n`
9
+     };
10
+ };
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "testCases": {
4
+ "iotlam-iot-lambda-use-existing-func/Integ/DefaultTest": {
5
+ "stacks": [
6
+ "iotlam-iot-lambda-use-existing-func"
7
+ ],
8
+ "assertionStack": "iotlam-iot-lambda-use-existing-func/Integ/DefaultTest/DeployAssert",
9
+ "assertionStackName": "iotlamiotlambdauseexistingfuncIntegDefaultTestDeployAssert1472E245"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "files": {
4
+ "42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c": {
5
+ "source": {
6
+ "path": "asset.42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c",
7
+ "packaging": "zip"
8
+ },
9
+ "destinations": {
10
+ "current_account-current_region": {
11
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
+ "objectKey": "42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c.zip",
13
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14
+ }
15
+ }
16
+ },
17
+ "e0806d10dfdd849d6edcdfdc5a48cfdd40714fc22c8533168993623c4fbcd551": {
18
+ "source": {
19
+ "path": "iotlam-iot-lambda-use-existing-func.template.json",
20
+ "packaging": "file"
21
+ },
22
+ "destinations": {
23
+ "current_account-current_region": {
24
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25
+ "objectKey": "e0806d10dfdd849d6edcdfdc5a48cfdd40714fc22c8533168993623c4fbcd551.json",
26
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "dockerImages": {}
32
+ }
@@ -0,0 +1,217 @@
1
+ {
2
+ "Resources": {
3
+ "LambdaFunctionServiceRole0C4CDE0B": {
4
+ "Type": "AWS::IAM::Role",
5
+ "Properties": {
6
+ "AssumeRolePolicyDocument": {
7
+ "Statement": [
8
+ {
9
+ "Action": "sts:AssumeRole",
10
+ "Effect": "Allow",
11
+ "Principal": {
12
+ "Service": "lambda.amazonaws.com"
13
+ }
14
+ }
15
+ ],
16
+ "Version": "2012-10-17"
17
+ },
18
+ "Policies": [
19
+ {
20
+ "PolicyDocument": {
21
+ "Statement": [
22
+ {
23
+ "Action": [
24
+ "logs:CreateLogGroup",
25
+ "logs:CreateLogStream",
26
+ "logs:PutLogEvents"
27
+ ],
28
+ "Effect": "Allow",
29
+ "Resource": {
30
+ "Fn::Join": [
31
+ "",
32
+ [
33
+ "arn:",
34
+ {
35
+ "Ref": "AWS::Partition"
36
+ },
37
+ ":logs:",
38
+ {
39
+ "Ref": "AWS::Region"
40
+ },
41
+ ":",
42
+ {
43
+ "Ref": "AWS::AccountId"
44
+ },
45
+ ":log-group:/aws/lambda/*"
46
+ ]
47
+ ]
48
+ }
49
+ }
50
+ ],
51
+ "Version": "2012-10-17"
52
+ },
53
+ "PolicyName": "LambdaFunctionServiceRolePolicy"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ "LambdaFunctionServiceRoleDefaultPolicy126C8897": {
59
+ "Type": "AWS::IAM::Policy",
60
+ "Properties": {
61
+ "PolicyDocument": {
62
+ "Statement": [
63
+ {
64
+ "Action": [
65
+ "xray:PutTelemetryRecords",
66
+ "xray:PutTraceSegments"
67
+ ],
68
+ "Effect": "Allow",
69
+ "Resource": "*"
70
+ }
71
+ ],
72
+ "Version": "2012-10-17"
73
+ },
74
+ "PolicyName": "LambdaFunctionServiceRoleDefaultPolicy126C8897",
75
+ "Roles": [
76
+ {
77
+ "Ref": "LambdaFunctionServiceRole0C4CDE0B"
78
+ }
79
+ ]
80
+ },
81
+ "Metadata": {
82
+ "cfn_nag": {
83
+ "rules_to_suppress": [
84
+ {
85
+ "id": "W12",
86
+ "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
87
+ }
88
+ ]
89
+ }
90
+ }
91
+ },
92
+ "LambdaFunctionBF21E41F": {
93
+ "Type": "AWS::Lambda::Function",
94
+ "Properties": {
95
+ "Code": {
96
+ "S3Bucket": {
97
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
98
+ },
99
+ "S3Key": "42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c.zip"
100
+ },
101
+ "Environment": {
102
+ "Variables": {
103
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
104
+ }
105
+ },
106
+ "Handler": "index.handler",
107
+ "Role": {
108
+ "Fn::GetAtt": [
109
+ "LambdaFunctionServiceRole0C4CDE0B",
110
+ "Arn"
111
+ ]
112
+ },
113
+ "Runtime": "nodejs16.x",
114
+ "TracingConfig": {
115
+ "Mode": "Active"
116
+ }
117
+ },
118
+ "DependsOn": [
119
+ "LambdaFunctionServiceRoleDefaultPolicy126C8897",
120
+ "LambdaFunctionServiceRole0C4CDE0B"
121
+ ],
122
+ "Metadata": {
123
+ "cfn_nag": {
124
+ "rules_to_suppress": [
125
+ {
126
+ "id": "W58",
127
+ "reason": "Lambda functions has the required permission to write CloudWatch Logs. It uses custom policy instead of arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole with tighter permissions."
128
+ },
129
+ {
130
+ "id": "W89",
131
+ "reason": "This is not a rule for the general case, just for specific use cases/industries"
132
+ },
133
+ {
134
+ "id": "W92",
135
+ "reason": "Impossible for us to define the correct concurrency for clients"
136
+ }
137
+ ]
138
+ }
139
+ }
140
+ },
141
+ "LambdaFunctionAwsIotLambdaInvokePermission13FA2DACB": {
142
+ "Type": "AWS::Lambda::Permission",
143
+ "Properties": {
144
+ "Action": "lambda:InvokeFunction",
145
+ "FunctionName": {
146
+ "Fn::GetAtt": [
147
+ "LambdaFunctionBF21E41F",
148
+ "Arn"
149
+ ]
150
+ },
151
+ "Principal": "iot.amazonaws.com",
152
+ "SourceArn": {
153
+ "Fn::GetAtt": [
154
+ "testiotlambdaintegrationIotTopic18B6A735",
155
+ "Arn"
156
+ ]
157
+ }
158
+ }
159
+ },
160
+ "testiotlambdaintegrationIotTopic18B6A735": {
161
+ "Type": "AWS::IoT::TopicRule",
162
+ "Properties": {
163
+ "TopicRulePayload": {
164
+ "Actions": [
165
+ {
166
+ "Lambda": {
167
+ "FunctionArn": {
168
+ "Fn::GetAtt": [
169
+ "LambdaFunctionBF21E41F",
170
+ "Arn"
171
+ ]
172
+ }
173
+ }
174
+ }
175
+ ],
176
+ "Description": "Processing of DTC messages from the AWS Connected Vehicle Solution.",
177
+ "RuleDisabled": false,
178
+ "Sql": "SELECT * FROM 'connectedcar/dtc/#'"
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "Parameters": {
184
+ "BootstrapVersion": {
185
+ "Type": "AWS::SSM::Parameter::Value<String>",
186
+ "Default": "/cdk-bootstrap/hnb659fds/version",
187
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
188
+ }
189
+ },
190
+ "Rules": {
191
+ "CheckBootstrapVersion": {
192
+ "Assertions": [
193
+ {
194
+ "Assert": {
195
+ "Fn::Not": [
196
+ {
197
+ "Fn::Contains": [
198
+ [
199
+ "1",
200
+ "2",
201
+ "3",
202
+ "4",
203
+ "5"
204
+ ],
205
+ {
206
+ "Ref": "BootstrapVersion"
207
+ }
208
+ ]
209
+ }
210
+ ]
211
+ },
212
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
213
+ }
214
+ ]
215
+ }
216
+ }
217
+ }