@aws-solutions-constructs/aws-eventbridge-lambda 1.120.0 → 1.121.0

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.
@@ -1,1172 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`check multiple constructs in a single stack 1`] = `
4
- Object {
5
- "Parameters": Object {
6
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cArtifactHash00A70A91": Object {
7
- "Description": "Artifact hash for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
8
- "Type": "String",
9
- },
10
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC": Object {
11
- "Description": "S3 bucket for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
12
- "Type": "String",
13
- },
14
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872": Object {
15
- "Description": "S3 key for asset version \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
16
- "Type": "String",
17
- },
18
- },
19
- "Resources": Object {
20
- "testneweventbridgelambda1CustomEventBus8F6307CE": Object {
21
- "Properties": Object {
22
- "Name": "testneweventbridgelambda1CustomEventBus32DD8C10",
23
- },
24
- "Type": "AWS::Events::EventBus",
25
- },
26
- "testneweventbridgelambda1EventsRuleA880FEC6": Object {
27
- "Properties": Object {
28
- "EventBusName": Object {
29
- "Ref": "testneweventbridgelambda1CustomEventBus8F6307CE",
30
- },
31
- "EventPattern": Object {
32
- "source": Array [
33
- "solutionsconstructs",
34
- ],
35
- },
36
- "State": "ENABLED",
37
- "Targets": Array [
38
- Object {
39
- "Arn": Object {
40
- "Fn::GetAtt": Array [
41
- "testneweventbridgelambda1LambdaFunction6B1B71BE",
42
- "Arn",
43
- ],
44
- },
45
- "Id": "Target0",
46
- },
47
- ],
48
- },
49
- "Type": "AWS::Events::Rule",
50
- },
51
- "testneweventbridgelambda1LambdaFunction6B1B71BE": Object {
52
- "DependsOn": Array [
53
- "testneweventbridgelambda1LambdaFunctionServiceRoleDefaultPolicy936A7F9D",
54
- "testneweventbridgelambda1LambdaFunctionServiceRoleA0E1765D",
55
- ],
56
- "Metadata": Object {
57
- "cfn_nag": Object {
58
- "rules_to_suppress": Array [
59
- Object {
60
- "id": "W58",
61
- "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.",
62
- },
63
- Object {
64
- "id": "W89",
65
- "reason": "This is not a rule for the general case, just for specific use cases/industries",
66
- },
67
- Object {
68
- "id": "W92",
69
- "reason": "Impossible for us to define the correct concurrency for clients",
70
- },
71
- ],
72
- },
73
- },
74
- "Properties": Object {
75
- "Code": Object {
76
- "S3Bucket": Object {
77
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC",
78
- },
79
- "S3Key": Object {
80
- "Fn::Join": Array [
81
- "",
82
- Array [
83
- Object {
84
- "Fn::Select": Array [
85
- 0,
86
- Object {
87
- "Fn::Split": Array [
88
- "||",
89
- Object {
90
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
91
- },
92
- ],
93
- },
94
- ],
95
- },
96
- Object {
97
- "Fn::Select": Array [
98
- 1,
99
- Object {
100
- "Fn::Split": Array [
101
- "||",
102
- Object {
103
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
104
- },
105
- ],
106
- },
107
- ],
108
- },
109
- ],
110
- ],
111
- },
112
- },
113
- "Environment": Object {
114
- "Variables": Object {
115
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
116
- },
117
- },
118
- "Handler": "index.handler",
119
- "Role": Object {
120
- "Fn::GetAtt": Array [
121
- "testneweventbridgelambda1LambdaFunctionServiceRoleA0E1765D",
122
- "Arn",
123
- ],
124
- },
125
- "Runtime": "nodejs12.x",
126
- "TracingConfig": Object {
127
- "Mode": "Active",
128
- },
129
- },
130
- "Type": "AWS::Lambda::Function",
131
- },
132
- "testneweventbridgelambda1LambdaFunctionAwsEventsLambdaInvokePermission1A7F397DB": Object {
133
- "Properties": Object {
134
- "Action": "lambda:InvokeFunction",
135
- "FunctionName": Object {
136
- "Fn::GetAtt": Array [
137
- "testneweventbridgelambda1LambdaFunction6B1B71BE",
138
- "Arn",
139
- ],
140
- },
141
- "Principal": "events.amazonaws.com",
142
- "SourceArn": Object {
143
- "Fn::GetAtt": Array [
144
- "testneweventbridgelambda1EventsRuleA880FEC6",
145
- "Arn",
146
- ],
147
- },
148
- },
149
- "Type": "AWS::Lambda::Permission",
150
- },
151
- "testneweventbridgelambda1LambdaFunctionServiceRoleA0E1765D": Object {
152
- "Properties": Object {
153
- "AssumeRolePolicyDocument": Object {
154
- "Statement": Array [
155
- Object {
156
- "Action": "sts:AssumeRole",
157
- "Effect": "Allow",
158
- "Principal": Object {
159
- "Service": "lambda.amazonaws.com",
160
- },
161
- },
162
- ],
163
- "Version": "2012-10-17",
164
- },
165
- "Policies": Array [
166
- Object {
167
- "PolicyDocument": Object {
168
- "Statement": Array [
169
- Object {
170
- "Action": Array [
171
- "logs:CreateLogGroup",
172
- "logs:CreateLogStream",
173
- "logs:PutLogEvents",
174
- ],
175
- "Effect": "Allow",
176
- "Resource": Object {
177
- "Fn::Join": Array [
178
- "",
179
- Array [
180
- "arn:",
181
- Object {
182
- "Ref": "AWS::Partition",
183
- },
184
- ":logs:",
185
- Object {
186
- "Ref": "AWS::Region",
187
- },
188
- ":",
189
- Object {
190
- "Ref": "AWS::AccountId",
191
- },
192
- ":log-group:/aws/lambda/*",
193
- ],
194
- ],
195
- },
196
- },
197
- ],
198
- "Version": "2012-10-17",
199
- },
200
- "PolicyName": "LambdaFunctionServiceRolePolicy",
201
- },
202
- ],
203
- },
204
- "Type": "AWS::IAM::Role",
205
- },
206
- "testneweventbridgelambda1LambdaFunctionServiceRoleDefaultPolicy936A7F9D": Object {
207
- "Metadata": Object {
208
- "cfn_nag": Object {
209
- "rules_to_suppress": Array [
210
- Object {
211
- "id": "W12",
212
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.",
213
- },
214
- ],
215
- },
216
- },
217
- "Properties": Object {
218
- "PolicyDocument": Object {
219
- "Statement": Array [
220
- Object {
221
- "Action": Array [
222
- "xray:PutTraceSegments",
223
- "xray:PutTelemetryRecords",
224
- ],
225
- "Effect": "Allow",
226
- "Resource": "*",
227
- },
228
- ],
229
- "Version": "2012-10-17",
230
- },
231
- "PolicyName": "testneweventbridgelambda1LambdaFunctionServiceRoleDefaultPolicy936A7F9D",
232
- "Roles": Array [
233
- Object {
234
- "Ref": "testneweventbridgelambda1LambdaFunctionServiceRoleA0E1765D",
235
- },
236
- ],
237
- },
238
- "Type": "AWS::IAM::Policy",
239
- },
240
- "testneweventbridgelambda2CustomEventBusE7F7F8AE": Object {
241
- "Properties": Object {
242
- "Name": "testneweventbridgelambda2CustomEventBus2A5AAEB3",
243
- },
244
- "Type": "AWS::Events::EventBus",
245
- },
246
- "testneweventbridgelambda2EventsRuleC907730B": Object {
247
- "Properties": Object {
248
- "EventBusName": Object {
249
- "Ref": "testneweventbridgelambda2CustomEventBusE7F7F8AE",
250
- },
251
- "EventPattern": Object {
252
- "source": Array [
253
- "solutionsconstructs",
254
- ],
255
- },
256
- "State": "ENABLED",
257
- "Targets": Array [
258
- Object {
259
- "Arn": Object {
260
- "Fn::GetAtt": Array [
261
- "testneweventbridgelambda2LambdaFunction68C27D79",
262
- "Arn",
263
- ],
264
- },
265
- "Id": "Target0",
266
- },
267
- ],
268
- },
269
- "Type": "AWS::Events::Rule",
270
- },
271
- "testneweventbridgelambda2LambdaFunction68C27D79": Object {
272
- "DependsOn": Array [
273
- "testneweventbridgelambda2LambdaFunctionServiceRoleDefaultPolicyE8769E57",
274
- "testneweventbridgelambda2LambdaFunctionServiceRole6B0C9C0A",
275
- ],
276
- "Metadata": Object {
277
- "cfn_nag": Object {
278
- "rules_to_suppress": Array [
279
- Object {
280
- "id": "W58",
281
- "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.",
282
- },
283
- Object {
284
- "id": "W89",
285
- "reason": "This is not a rule for the general case, just for specific use cases/industries",
286
- },
287
- Object {
288
- "id": "W92",
289
- "reason": "Impossible for us to define the correct concurrency for clients",
290
- },
291
- ],
292
- },
293
- },
294
- "Properties": Object {
295
- "Code": Object {
296
- "S3Bucket": Object {
297
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC",
298
- },
299
- "S3Key": Object {
300
- "Fn::Join": Array [
301
- "",
302
- Array [
303
- Object {
304
- "Fn::Select": Array [
305
- 0,
306
- Object {
307
- "Fn::Split": Array [
308
- "||",
309
- Object {
310
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
311
- },
312
- ],
313
- },
314
- ],
315
- },
316
- Object {
317
- "Fn::Select": Array [
318
- 1,
319
- Object {
320
- "Fn::Split": Array [
321
- "||",
322
- Object {
323
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
324
- },
325
- ],
326
- },
327
- ],
328
- },
329
- ],
330
- ],
331
- },
332
- },
333
- "Environment": Object {
334
- "Variables": Object {
335
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
336
- },
337
- },
338
- "Handler": "index.handler",
339
- "Role": Object {
340
- "Fn::GetAtt": Array [
341
- "testneweventbridgelambda2LambdaFunctionServiceRole6B0C9C0A",
342
- "Arn",
343
- ],
344
- },
345
- "Runtime": "nodejs12.x",
346
- "TracingConfig": Object {
347
- "Mode": "Active",
348
- },
349
- },
350
- "Type": "AWS::Lambda::Function",
351
- },
352
- "testneweventbridgelambda2LambdaFunctionAwsEventsLambdaInvokePermission1B0249F6C": Object {
353
- "Properties": Object {
354
- "Action": "lambda:InvokeFunction",
355
- "FunctionName": Object {
356
- "Fn::GetAtt": Array [
357
- "testneweventbridgelambda2LambdaFunction68C27D79",
358
- "Arn",
359
- ],
360
- },
361
- "Principal": "events.amazonaws.com",
362
- "SourceArn": Object {
363
- "Fn::GetAtt": Array [
364
- "testneweventbridgelambda2EventsRuleC907730B",
365
- "Arn",
366
- ],
367
- },
368
- },
369
- "Type": "AWS::Lambda::Permission",
370
- },
371
- "testneweventbridgelambda2LambdaFunctionServiceRole6B0C9C0A": Object {
372
- "Properties": Object {
373
- "AssumeRolePolicyDocument": Object {
374
- "Statement": Array [
375
- Object {
376
- "Action": "sts:AssumeRole",
377
- "Effect": "Allow",
378
- "Principal": Object {
379
- "Service": "lambda.amazonaws.com",
380
- },
381
- },
382
- ],
383
- "Version": "2012-10-17",
384
- },
385
- "Policies": Array [
386
- Object {
387
- "PolicyDocument": Object {
388
- "Statement": Array [
389
- Object {
390
- "Action": Array [
391
- "logs:CreateLogGroup",
392
- "logs:CreateLogStream",
393
- "logs:PutLogEvents",
394
- ],
395
- "Effect": "Allow",
396
- "Resource": Object {
397
- "Fn::Join": Array [
398
- "",
399
- Array [
400
- "arn:",
401
- Object {
402
- "Ref": "AWS::Partition",
403
- },
404
- ":logs:",
405
- Object {
406
- "Ref": "AWS::Region",
407
- },
408
- ":",
409
- Object {
410
- "Ref": "AWS::AccountId",
411
- },
412
- ":log-group:/aws/lambda/*",
413
- ],
414
- ],
415
- },
416
- },
417
- ],
418
- "Version": "2012-10-17",
419
- },
420
- "PolicyName": "LambdaFunctionServiceRolePolicy",
421
- },
422
- ],
423
- },
424
- "Type": "AWS::IAM::Role",
425
- },
426
- "testneweventbridgelambda2LambdaFunctionServiceRoleDefaultPolicyE8769E57": Object {
427
- "Metadata": Object {
428
- "cfn_nag": Object {
429
- "rules_to_suppress": Array [
430
- Object {
431
- "id": "W12",
432
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.",
433
- },
434
- ],
435
- },
436
- },
437
- "Properties": Object {
438
- "PolicyDocument": Object {
439
- "Statement": Array [
440
- Object {
441
- "Action": Array [
442
- "xray:PutTraceSegments",
443
- "xray:PutTelemetryRecords",
444
- ],
445
- "Effect": "Allow",
446
- "Resource": "*",
447
- },
448
- ],
449
- "Version": "2012-10-17",
450
- },
451
- "PolicyName": "testneweventbridgelambda2LambdaFunctionServiceRoleDefaultPolicyE8769E57",
452
- "Roles": Array [
453
- Object {
454
- "Ref": "testneweventbridgelambda2LambdaFunctionServiceRole6B0C9C0A",
455
- },
456
- ],
457
- },
458
- "Type": "AWS::IAM::Policy",
459
- },
460
- },
461
- }
462
- `;
463
-
464
- exports[`snapshot test EventbridgeToLambda custom event bus params 1`] = `
465
- Object {
466
- "Parameters": Object {
467
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cArtifactHash00A70A91": Object {
468
- "Description": "Artifact hash for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
469
- "Type": "String",
470
- },
471
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC": Object {
472
- "Description": "S3 bucket for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
473
- "Type": "String",
474
- },
475
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872": Object {
476
- "Description": "S3 key for asset version \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
477
- "Type": "String",
478
- },
479
- },
480
- "Resources": Object {
481
- "testneweventbridgelambdaCustomEventBus42BE6810": Object {
482
- "Properties": Object {
483
- "Name": "testneweventbridgelambdaCustomEventBusDA817FEF",
484
- },
485
- "Type": "AWS::Events::EventBus",
486
- },
487
- "testneweventbridgelambdaEventsRule584DE841": Object {
488
- "Properties": Object {
489
- "EventBusName": Object {
490
- "Ref": "testneweventbridgelambdaCustomEventBus42BE6810",
491
- },
492
- "EventPattern": Object {
493
- "source": Array [
494
- "solutionsconstructs",
495
- ],
496
- },
497
- "State": "ENABLED",
498
- "Targets": Array [
499
- Object {
500
- "Arn": Object {
501
- "Fn::GetAtt": Array [
502
- "testneweventbridgelambdaLambdaFunction4C935769",
503
- "Arn",
504
- ],
505
- },
506
- "Id": "Target0",
507
- },
508
- ],
509
- },
510
- "Type": "AWS::Events::Rule",
511
- },
512
- "testneweventbridgelambdaLambdaFunction4C935769": Object {
513
- "DependsOn": Array [
514
- "testneweventbridgelambdaLambdaFunctionServiceRoleDefaultPolicy701C67E1",
515
- "testneweventbridgelambdaLambdaFunctionServiceRole0B14BEDF",
516
- ],
517
- "Metadata": Object {
518
- "cfn_nag": Object {
519
- "rules_to_suppress": Array [
520
- Object {
521
- "id": "W58",
522
- "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.",
523
- },
524
- Object {
525
- "id": "W89",
526
- "reason": "This is not a rule for the general case, just for specific use cases/industries",
527
- },
528
- Object {
529
- "id": "W92",
530
- "reason": "Impossible for us to define the correct concurrency for clients",
531
- },
532
- ],
533
- },
534
- },
535
- "Properties": Object {
536
- "Code": Object {
537
- "S3Bucket": Object {
538
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC",
539
- },
540
- "S3Key": Object {
541
- "Fn::Join": Array [
542
- "",
543
- Array [
544
- Object {
545
- "Fn::Select": Array [
546
- 0,
547
- Object {
548
- "Fn::Split": Array [
549
- "||",
550
- Object {
551
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
552
- },
553
- ],
554
- },
555
- ],
556
- },
557
- Object {
558
- "Fn::Select": Array [
559
- 1,
560
- Object {
561
- "Fn::Split": Array [
562
- "||",
563
- Object {
564
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
565
- },
566
- ],
567
- },
568
- ],
569
- },
570
- ],
571
- ],
572
- },
573
- },
574
- "Environment": Object {
575
- "Variables": Object {
576
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
577
- },
578
- },
579
- "Handler": "index.handler",
580
- "Role": Object {
581
- "Fn::GetAtt": Array [
582
- "testneweventbridgelambdaLambdaFunctionServiceRole0B14BEDF",
583
- "Arn",
584
- ],
585
- },
586
- "Runtime": "nodejs12.x",
587
- "TracingConfig": Object {
588
- "Mode": "Active",
589
- },
590
- },
591
- "Type": "AWS::Lambda::Function",
592
- },
593
- "testneweventbridgelambdaLambdaFunctionAwsEventsLambdaInvokePermission1A6FDDA08": Object {
594
- "Properties": Object {
595
- "Action": "lambda:InvokeFunction",
596
- "FunctionName": Object {
597
- "Fn::GetAtt": Array [
598
- "testneweventbridgelambdaLambdaFunction4C935769",
599
- "Arn",
600
- ],
601
- },
602
- "Principal": "events.amazonaws.com",
603
- "SourceArn": Object {
604
- "Fn::GetAtt": Array [
605
- "testneweventbridgelambdaEventsRule584DE841",
606
- "Arn",
607
- ],
608
- },
609
- },
610
- "Type": "AWS::Lambda::Permission",
611
- },
612
- "testneweventbridgelambdaLambdaFunctionServiceRole0B14BEDF": Object {
613
- "Properties": Object {
614
- "AssumeRolePolicyDocument": Object {
615
- "Statement": Array [
616
- Object {
617
- "Action": "sts:AssumeRole",
618
- "Effect": "Allow",
619
- "Principal": Object {
620
- "Service": "lambda.amazonaws.com",
621
- },
622
- },
623
- ],
624
- "Version": "2012-10-17",
625
- },
626
- "Policies": Array [
627
- Object {
628
- "PolicyDocument": Object {
629
- "Statement": Array [
630
- Object {
631
- "Action": Array [
632
- "logs:CreateLogGroup",
633
- "logs:CreateLogStream",
634
- "logs:PutLogEvents",
635
- ],
636
- "Effect": "Allow",
637
- "Resource": Object {
638
- "Fn::Join": Array [
639
- "",
640
- Array [
641
- "arn:",
642
- Object {
643
- "Ref": "AWS::Partition",
644
- },
645
- ":logs:",
646
- Object {
647
- "Ref": "AWS::Region",
648
- },
649
- ":",
650
- Object {
651
- "Ref": "AWS::AccountId",
652
- },
653
- ":log-group:/aws/lambda/*",
654
- ],
655
- ],
656
- },
657
- },
658
- ],
659
- "Version": "2012-10-17",
660
- },
661
- "PolicyName": "LambdaFunctionServiceRolePolicy",
662
- },
663
- ],
664
- },
665
- "Type": "AWS::IAM::Role",
666
- },
667
- "testneweventbridgelambdaLambdaFunctionServiceRoleDefaultPolicy701C67E1": Object {
668
- "Metadata": Object {
669
- "cfn_nag": Object {
670
- "rules_to_suppress": Array [
671
- Object {
672
- "id": "W12",
673
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.",
674
- },
675
- ],
676
- },
677
- },
678
- "Properties": Object {
679
- "PolicyDocument": Object {
680
- "Statement": Array [
681
- Object {
682
- "Action": Array [
683
- "xray:PutTraceSegments",
684
- "xray:PutTelemetryRecords",
685
- ],
686
- "Effect": "Allow",
687
- "Resource": "*",
688
- },
689
- ],
690
- "Version": "2012-10-17",
691
- },
692
- "PolicyName": "testneweventbridgelambdaLambdaFunctionServiceRoleDefaultPolicy701C67E1",
693
- "Roles": Array [
694
- Object {
695
- "Ref": "testneweventbridgelambdaLambdaFunctionServiceRole0B14BEDF",
696
- },
697
- ],
698
- },
699
- "Type": "AWS::IAM::Policy",
700
- },
701
- },
702
- }
703
- `;
704
-
705
- exports[`snapshot test EventbridgeToLambda default params 1`] = `
706
- Object {
707
- "Parameters": Object {
708
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cArtifactHash00A70A91": Object {
709
- "Description": "Artifact hash for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
710
- "Type": "String",
711
- },
712
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC": Object {
713
- "Description": "S3 bucket for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
714
- "Type": "String",
715
- },
716
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872": Object {
717
- "Description": "S3 key for asset version \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
718
- "Type": "String",
719
- },
720
- },
721
- "Resources": Object {
722
- "testeventbridgelambdaEventsRule7DB0954D": Object {
723
- "Properties": Object {
724
- "ScheduleExpression": "rate(5 minutes)",
725
- "State": "ENABLED",
726
- "Targets": Array [
727
- Object {
728
- "Arn": Object {
729
- "Fn::GetAtt": Array [
730
- "testeventbridgelambdaLambdaFunction475423FD",
731
- "Arn",
732
- ],
733
- },
734
- "Id": "Target0",
735
- },
736
- ],
737
- },
738
- "Type": "AWS::Events::Rule",
739
- },
740
- "testeventbridgelambdaLambdaFunction475423FD": Object {
741
- "DependsOn": Array [
742
- "testeventbridgelambdaLambdaFunctionServiceRoleDefaultPolicyB0C15F1B",
743
- "testeventbridgelambdaLambdaFunctionServiceRole6D02CEEE",
744
- ],
745
- "Metadata": Object {
746
- "cfn_nag": Object {
747
- "rules_to_suppress": Array [
748
- Object {
749
- "id": "W58",
750
- "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.",
751
- },
752
- Object {
753
- "id": "W89",
754
- "reason": "This is not a rule for the general case, just for specific use cases/industries",
755
- },
756
- Object {
757
- "id": "W92",
758
- "reason": "Impossible for us to define the correct concurrency for clients",
759
- },
760
- ],
761
- },
762
- },
763
- "Properties": Object {
764
- "Code": Object {
765
- "S3Bucket": Object {
766
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC",
767
- },
768
- "S3Key": Object {
769
- "Fn::Join": Array [
770
- "",
771
- Array [
772
- Object {
773
- "Fn::Select": Array [
774
- 0,
775
- Object {
776
- "Fn::Split": Array [
777
- "||",
778
- Object {
779
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
780
- },
781
- ],
782
- },
783
- ],
784
- },
785
- Object {
786
- "Fn::Select": Array [
787
- 1,
788
- Object {
789
- "Fn::Split": Array [
790
- "||",
791
- Object {
792
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
793
- },
794
- ],
795
- },
796
- ],
797
- },
798
- ],
799
- ],
800
- },
801
- },
802
- "Environment": Object {
803
- "Variables": Object {
804
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
805
- },
806
- },
807
- "Handler": "index.handler",
808
- "Role": Object {
809
- "Fn::GetAtt": Array [
810
- "testeventbridgelambdaLambdaFunctionServiceRole6D02CEEE",
811
- "Arn",
812
- ],
813
- },
814
- "Runtime": "nodejs12.x",
815
- "TracingConfig": Object {
816
- "Mode": "Active",
817
- },
818
- },
819
- "Type": "AWS::Lambda::Function",
820
- },
821
- "testeventbridgelambdaLambdaFunctionAwsEventsLambdaInvokePermission1C8A95062": Object {
822
- "Properties": Object {
823
- "Action": "lambda:InvokeFunction",
824
- "FunctionName": Object {
825
- "Fn::GetAtt": Array [
826
- "testeventbridgelambdaLambdaFunction475423FD",
827
- "Arn",
828
- ],
829
- },
830
- "Principal": "events.amazonaws.com",
831
- "SourceArn": Object {
832
- "Fn::GetAtt": Array [
833
- "testeventbridgelambdaEventsRule7DB0954D",
834
- "Arn",
835
- ],
836
- },
837
- },
838
- "Type": "AWS::Lambda::Permission",
839
- },
840
- "testeventbridgelambdaLambdaFunctionServiceRole6D02CEEE": Object {
841
- "Properties": Object {
842
- "AssumeRolePolicyDocument": Object {
843
- "Statement": Array [
844
- Object {
845
- "Action": "sts:AssumeRole",
846
- "Effect": "Allow",
847
- "Principal": Object {
848
- "Service": "lambda.amazonaws.com",
849
- },
850
- },
851
- ],
852
- "Version": "2012-10-17",
853
- },
854
- "Policies": Array [
855
- Object {
856
- "PolicyDocument": Object {
857
- "Statement": Array [
858
- Object {
859
- "Action": Array [
860
- "logs:CreateLogGroup",
861
- "logs:CreateLogStream",
862
- "logs:PutLogEvents",
863
- ],
864
- "Effect": "Allow",
865
- "Resource": Object {
866
- "Fn::Join": Array [
867
- "",
868
- Array [
869
- "arn:",
870
- Object {
871
- "Ref": "AWS::Partition",
872
- },
873
- ":logs:",
874
- Object {
875
- "Ref": "AWS::Region",
876
- },
877
- ":",
878
- Object {
879
- "Ref": "AWS::AccountId",
880
- },
881
- ":log-group:/aws/lambda/*",
882
- ],
883
- ],
884
- },
885
- },
886
- ],
887
- "Version": "2012-10-17",
888
- },
889
- "PolicyName": "LambdaFunctionServiceRolePolicy",
890
- },
891
- ],
892
- },
893
- "Type": "AWS::IAM::Role",
894
- },
895
- "testeventbridgelambdaLambdaFunctionServiceRoleDefaultPolicyB0C15F1B": Object {
896
- "Metadata": Object {
897
- "cfn_nag": Object {
898
- "rules_to_suppress": Array [
899
- Object {
900
- "id": "W12",
901
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.",
902
- },
903
- ],
904
- },
905
- },
906
- "Properties": Object {
907
- "PolicyDocument": Object {
908
- "Statement": Array [
909
- Object {
910
- "Action": Array [
911
- "xray:PutTraceSegments",
912
- "xray:PutTelemetryRecords",
913
- ],
914
- "Effect": "Allow",
915
- "Resource": "*",
916
- },
917
- ],
918
- "Version": "2012-10-17",
919
- },
920
- "PolicyName": "testeventbridgelambdaLambdaFunctionServiceRoleDefaultPolicyB0C15F1B",
921
- "Roles": Array [
922
- Object {
923
- "Ref": "testeventbridgelambdaLambdaFunctionServiceRole6D02CEEE",
924
- },
925
- ],
926
- },
927
- "Type": "AWS::IAM::Policy",
928
- },
929
- },
930
- }
931
- `;
932
-
933
- exports[`snapshot test EventbridgeToLambda existing event bus params 1`] = `
934
- Object {
935
- "Parameters": Object {
936
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cArtifactHash00A70A91": Object {
937
- "Description": "Artifact hash for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
938
- "Type": "String",
939
- },
940
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC": Object {
941
- "Description": "S3 bucket for asset \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
942
- "Type": "String",
943
- },
944
- "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872": Object {
945
- "Description": "S3 key for asset version \\"42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c\\"",
946
- "Type": "String",
947
- },
948
- },
949
- "Resources": Object {
950
- "testexistingeventbridgelambdaEventsRule6EB82633": Object {
951
- "Properties": Object {
952
- "EventBusName": Object {
953
- "Ref": "testexistingeventbusC6E4A2D0",
954
- },
955
- "EventPattern": Object {
956
- "source": Array [
957
- "solutionsconstructs",
958
- ],
959
- },
960
- "State": "ENABLED",
961
- "Targets": Array [
962
- Object {
963
- "Arn": Object {
964
- "Fn::GetAtt": Array [
965
- "testexistingeventbridgelambdaLambdaFunctionEAAA61EF",
966
- "Arn",
967
- ],
968
- },
969
- "Id": "Target0",
970
- },
971
- ],
972
- },
973
- "Type": "AWS::Events::Rule",
974
- },
975
- "testexistingeventbridgelambdaLambdaFunctionAwsEventsLambdaInvokePermission1DD91E957": Object {
976
- "Properties": Object {
977
- "Action": "lambda:InvokeFunction",
978
- "FunctionName": Object {
979
- "Fn::GetAtt": Array [
980
- "testexistingeventbridgelambdaLambdaFunctionEAAA61EF",
981
- "Arn",
982
- ],
983
- },
984
- "Principal": "events.amazonaws.com",
985
- "SourceArn": Object {
986
- "Fn::GetAtt": Array [
987
- "testexistingeventbridgelambdaEventsRule6EB82633",
988
- "Arn",
989
- ],
990
- },
991
- },
992
- "Type": "AWS::Lambda::Permission",
993
- },
994
- "testexistingeventbridgelambdaLambdaFunctionEAAA61EF": Object {
995
- "DependsOn": Array [
996
- "testexistingeventbridgelambdaLambdaFunctionServiceRoleDefaultPolicy11F12158",
997
- "testexistingeventbridgelambdaLambdaFunctionServiceRoleD4150277",
998
- ],
999
- "Metadata": Object {
1000
- "cfn_nag": Object {
1001
- "rules_to_suppress": Array [
1002
- Object {
1003
- "id": "W58",
1004
- "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.",
1005
- },
1006
- Object {
1007
- "id": "W89",
1008
- "reason": "This is not a rule for the general case, just for specific use cases/industries",
1009
- },
1010
- Object {
1011
- "id": "W92",
1012
- "reason": "Impossible for us to define the correct concurrency for clients",
1013
- },
1014
- ],
1015
- },
1016
- },
1017
- "Properties": Object {
1018
- "Code": Object {
1019
- "S3Bucket": Object {
1020
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3Bucket1F467BCC",
1021
- },
1022
- "S3Key": Object {
1023
- "Fn::Join": Array [
1024
- "",
1025
- Array [
1026
- Object {
1027
- "Fn::Select": Array [
1028
- 0,
1029
- Object {
1030
- "Fn::Split": Array [
1031
- "||",
1032
- Object {
1033
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
1034
- },
1035
- ],
1036
- },
1037
- ],
1038
- },
1039
- Object {
1040
- "Fn::Select": Array [
1041
- 1,
1042
- Object {
1043
- "Fn::Split": Array [
1044
- "||",
1045
- Object {
1046
- "Ref": "AssetParameters42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198cS3VersionKey9E4F7872",
1047
- },
1048
- ],
1049
- },
1050
- ],
1051
- },
1052
- ],
1053
- ],
1054
- },
1055
- },
1056
- "Environment": Object {
1057
- "Variables": Object {
1058
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
1059
- },
1060
- },
1061
- "Handler": "index.handler",
1062
- "Role": Object {
1063
- "Fn::GetAtt": Array [
1064
- "testexistingeventbridgelambdaLambdaFunctionServiceRoleD4150277",
1065
- "Arn",
1066
- ],
1067
- },
1068
- "Runtime": "nodejs12.x",
1069
- "TracingConfig": Object {
1070
- "Mode": "Active",
1071
- },
1072
- },
1073
- "Type": "AWS::Lambda::Function",
1074
- },
1075
- "testexistingeventbridgelambdaLambdaFunctionServiceRoleD4150277": Object {
1076
- "Properties": Object {
1077
- "AssumeRolePolicyDocument": Object {
1078
- "Statement": Array [
1079
- Object {
1080
- "Action": "sts:AssumeRole",
1081
- "Effect": "Allow",
1082
- "Principal": Object {
1083
- "Service": "lambda.amazonaws.com",
1084
- },
1085
- },
1086
- ],
1087
- "Version": "2012-10-17",
1088
- },
1089
- "Policies": Array [
1090
- Object {
1091
- "PolicyDocument": Object {
1092
- "Statement": Array [
1093
- Object {
1094
- "Action": Array [
1095
- "logs:CreateLogGroup",
1096
- "logs:CreateLogStream",
1097
- "logs:PutLogEvents",
1098
- ],
1099
- "Effect": "Allow",
1100
- "Resource": Object {
1101
- "Fn::Join": Array [
1102
- "",
1103
- Array [
1104
- "arn:",
1105
- Object {
1106
- "Ref": "AWS::Partition",
1107
- },
1108
- ":logs:",
1109
- Object {
1110
- "Ref": "AWS::Region",
1111
- },
1112
- ":",
1113
- Object {
1114
- "Ref": "AWS::AccountId",
1115
- },
1116
- ":log-group:/aws/lambda/*",
1117
- ],
1118
- ],
1119
- },
1120
- },
1121
- ],
1122
- "Version": "2012-10-17",
1123
- },
1124
- "PolicyName": "LambdaFunctionServiceRolePolicy",
1125
- },
1126
- ],
1127
- },
1128
- "Type": "AWS::IAM::Role",
1129
- },
1130
- "testexistingeventbridgelambdaLambdaFunctionServiceRoleDefaultPolicy11F12158": Object {
1131
- "Metadata": Object {
1132
- "cfn_nag": Object {
1133
- "rules_to_suppress": Array [
1134
- Object {
1135
- "id": "W12",
1136
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.",
1137
- },
1138
- ],
1139
- },
1140
- },
1141
- "Properties": Object {
1142
- "PolicyDocument": Object {
1143
- "Statement": Array [
1144
- Object {
1145
- "Action": Array [
1146
- "xray:PutTraceSegments",
1147
- "xray:PutTelemetryRecords",
1148
- ],
1149
- "Effect": "Allow",
1150
- "Resource": "*",
1151
- },
1152
- ],
1153
- "Version": "2012-10-17",
1154
- },
1155
- "PolicyName": "testexistingeventbridgelambdaLambdaFunctionServiceRoleDefaultPolicy11F12158",
1156
- "Roles": Array [
1157
- Object {
1158
- "Ref": "testexistingeventbridgelambdaLambdaFunctionServiceRoleD4150277",
1159
- },
1160
- ],
1161
- },
1162
- "Type": "AWS::IAM::Policy",
1163
- },
1164
- "testexistingeventbusC6E4A2D0": Object {
1165
- "Properties": Object {
1166
- "Name": "testexistingeventbus",
1167
- },
1168
- "Type": "AWS::Events::EventBus",
1169
- },
1170
- },
1171
- }
1172
- `;