@aws-solutions-constructs/aws-eventbridge-sqs 2.76.0 → 2.78.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.
Files changed (55) hide show
  1. package/.jsii +155 -39
  2. package/README.md +5 -0
  3. package/lib/index.d.ts +27 -0
  4. package/lib/index.js +26 -10
  5. package/package.json +9 -8
  6. package/test/eventbridge-sqs-queue.test.js +142 -3
  7. package/test/integ.evtsqs-custom-target.d.ts +13 -0
  8. package/test/integ.evtsqs-custom-target.js +36 -0
  9. package/test/integ.evtsqs-custom-target.js.snapshot/cdk.out +1 -0
  10. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqs-custom-target.assets.json +19 -0
  11. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqs-custom-target.template.json +312 -0
  12. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqscustomtargetIntegDefaultTestDeployAssertD220243E.assets.json +19 -0
  13. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqscustomtargetIntegDefaultTestDeployAssertD220243E.template.json +36 -0
  14. package/test/integ.evtsqs-custom-target.js.snapshot/integ.json +12 -0
  15. package/test/integ.evtsqs-custom-target.js.snapshot/manifest.json +149 -0
  16. package/test/integ.evtsqs-custom-target.js.snapshot/tree.json +487 -0
  17. package/test/integ.evtsqs-exist-bus.js.snapshot/cdk.out +1 -1
  18. package/test/integ.evtsqs-exist-bus.js.snapshot/evtsqs-exist-bus.assets.json +3 -3
  19. package/test/integ.evtsqs-exist-bus.js.snapshot/evtsqs-exist-bus.template.json +15 -6
  20. package/test/integ.evtsqs-exist-bus.js.snapshot/evtsqsexistbusIntegDefaultTestDeployAssertD6166996.assets.json +1 -1
  21. package/test/integ.evtsqs-exist-bus.js.snapshot/integ.json +1 -1
  22. package/test/integ.evtsqs-exist-bus.js.snapshot/manifest.json +2 -2
  23. package/test/integ.evtsqs-exist-bus.js.snapshot/tree.json +38 -29
  24. package/test/integ.evtsqs-exist-queue.js.snapshot/cdk.out +1 -1
  25. package/test/integ.evtsqs-exist-queue.js.snapshot/evtsqs-exist-queue.assets.json +3 -3
  26. package/test/integ.evtsqs-exist-queue.js.snapshot/evtsqs-exist-queue.template.json +15 -6
  27. package/test/integ.evtsqs-exist-queue.js.snapshot/evtsqsexistqueueIntegDefaultTestDeployAssert4E2D04AB.assets.json +1 -1
  28. package/test/integ.evtsqs-exist-queue.js.snapshot/integ.json +1 -1
  29. package/test/integ.evtsqs-exist-queue.js.snapshot/manifest.json +2 -2
  30. package/test/integ.evtsqs-exist-queue.js.snapshot/tree.json +36 -27
  31. package/test/integ.evtsqs-new-bus.js.snapshot/cdk.out +1 -1
  32. package/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.assets.json +3 -3
  33. package/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.template.json +15 -6
  34. package/test/integ.evtsqs-new-bus.js.snapshot/evtsqsnewbusIntegDefaultTestDeployAssertA45AD5F2.assets.json +1 -1
  35. package/test/integ.evtsqs-new-bus.js.snapshot/integ.json +1 -1
  36. package/test/integ.evtsqs-new-bus.js.snapshot/manifest.json +2 -20
  37. package/test/integ.evtsqs-new-bus.js.snapshot/tree.json +42 -33
  38. package/test/integ.evtsqs-no-arg.js.snapshot/cdk.out +1 -1
  39. package/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.assets.json +3 -3
  40. package/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.template.json +15 -6
  41. package/test/integ.evtsqs-no-arg.js.snapshot/evtsqsnoargIntegDefaultTestDeployAssertB5DFB718.assets.json +1 -1
  42. package/test/integ.evtsqs-no-arg.js.snapshot/integ.json +1 -1
  43. package/test/integ.evtsqs-no-arg.js.snapshot/manifest.json +2 -20
  44. package/test/integ.evtsqs-no-arg.js.snapshot/tree.json +40 -31
  45. package/test/integ.evtsqs-rule-dlq.d.ts +13 -0
  46. package/test/integ.evtsqs-rule-dlq.js +36 -0
  47. package/test/integ.evtsqs-rule-dlq.js.snapshot/cdk.out +1 -0
  48. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqs-rule-dlq.assets.json +19 -0
  49. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqs-rule-dlq.template.json +485 -0
  50. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqsruledlqIntegDefaultTestDeployAssertE0D1E1C2.assets.json +19 -0
  51. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqsruledlqIntegDefaultTestDeployAssertE0D1E1C2.template.json +36 -0
  52. package/test/integ.evtsqs-rule-dlq.js.snapshot/integ.json +12 -0
  53. package/test/integ.evtsqs-rule-dlq.js.snapshot/manifest.json +179 -0
  54. package/test/integ.evtsqs-rule-dlq.js.snapshot/tree.json +728 -0
  55. package/.eslintignore +0 -6
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "39.0.0",
3
+ "files": {
4
+ "1b987658e020bc5bb91c28188d302de48a98e534e39808f44580279068526530": {
5
+ "source": {
6
+ "path": "evtsqs-rule-dlq.template.json",
7
+ "packaging": "file"
8
+ },
9
+ "destinations": {
10
+ "current_account-current_region": {
11
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
+ "objectKey": "1b987658e020bc5bb91c28188d302de48a98e534e39808f44580279068526530.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
+ }
@@ -0,0 +1,485 @@
1
+ {
2
+ "Resources": {
3
+ "constructqueuedlq6B66D1E6": {
4
+ "Type": "AWS::SQS::Queue",
5
+ "Properties": {
6
+ "KmsMasterKeyId": "alias/aws/sqs"
7
+ },
8
+ "UpdateReplacePolicy": "Delete",
9
+ "DeletionPolicy": "Delete"
10
+ },
11
+ "constructqueuedlqPolicy3B6CC54E": {
12
+ "Type": "AWS::SQS::QueuePolicy",
13
+ "Properties": {
14
+ "PolicyDocument": {
15
+ "Statement": [
16
+ {
17
+ "Action": [
18
+ "sqs:AddPermission",
19
+ "sqs:DeleteMessage",
20
+ "sqs:GetQueueAttributes",
21
+ "sqs:ReceiveMessage",
22
+ "sqs:RemovePermission",
23
+ "sqs:SendMessage",
24
+ "sqs:SetQueueAttributes"
25
+ ],
26
+ "Effect": "Allow",
27
+ "Principal": {
28
+ "AWS": {
29
+ "Fn::Join": [
30
+ "",
31
+ [
32
+ "arn:",
33
+ {
34
+ "Ref": "AWS::Partition"
35
+ },
36
+ ":iam::",
37
+ {
38
+ "Ref": "AWS::AccountId"
39
+ },
40
+ ":root"
41
+ ]
42
+ ]
43
+ }
44
+ },
45
+ "Resource": {
46
+ "Fn::GetAtt": [
47
+ "constructqueuedlq6B66D1E6",
48
+ "Arn"
49
+ ]
50
+ },
51
+ "Sid": "QueueOwnerOnlyAccess"
52
+ },
53
+ {
54
+ "Action": "SQS:*",
55
+ "Condition": {
56
+ "Bool": {
57
+ "aws:SecureTransport": "false"
58
+ }
59
+ },
60
+ "Effect": "Deny",
61
+ "Principal": {
62
+ "AWS": "*"
63
+ },
64
+ "Resource": {
65
+ "Fn::GetAtt": [
66
+ "constructqueuedlq6B66D1E6",
67
+ "Arn"
68
+ ]
69
+ },
70
+ "Sid": "HttpsOnly"
71
+ }
72
+ ],
73
+ "Version": "2012-10-17"
74
+ },
75
+ "Queues": [
76
+ {
77
+ "Ref": "constructqueuedlq6B66D1E6"
78
+ }
79
+ ]
80
+ }
81
+ },
82
+ "constructqueueKey0638E1FB": {
83
+ "Type": "AWS::KMS::Key",
84
+ "Properties": {
85
+ "EnableKeyRotation": true,
86
+ "KeyPolicy": {
87
+ "Statement": [
88
+ {
89
+ "Action": "kms:*",
90
+ "Effect": "Allow",
91
+ "Principal": {
92
+ "AWS": {
93
+ "Fn::Join": [
94
+ "",
95
+ [
96
+ "arn:",
97
+ {
98
+ "Ref": "AWS::Partition"
99
+ },
100
+ ":iam::",
101
+ {
102
+ "Ref": "AWS::AccountId"
103
+ },
104
+ ":root"
105
+ ]
106
+ ]
107
+ }
108
+ },
109
+ "Resource": "*"
110
+ },
111
+ {
112
+ "Action": [
113
+ "kms:Decrypt",
114
+ "kms:Encrypt",
115
+ "kms:GenerateDataKey*",
116
+ "kms:ReEncrypt*"
117
+ ],
118
+ "Condition": {
119
+ "StringEquals": {
120
+ "aws:SourceAccount": {
121
+ "Ref": "AWS::AccountId"
122
+ }
123
+ }
124
+ },
125
+ "Effect": "Allow",
126
+ "Principal": {
127
+ "Service": "events.amazonaws.com"
128
+ },
129
+ "Resource": "*"
130
+ }
131
+ ],
132
+ "Version": "2012-10-17"
133
+ }
134
+ },
135
+ "UpdateReplacePolicy": "Retain",
136
+ "DeletionPolicy": "Retain"
137
+ },
138
+ "constructqueue481DC1EC": {
139
+ "Type": "AWS::SQS::Queue",
140
+ "Properties": {
141
+ "KmsMasterKeyId": {
142
+ "Fn::GetAtt": [
143
+ "constructqueueKey0638E1FB",
144
+ "Arn"
145
+ ]
146
+ },
147
+ "RedrivePolicy": {
148
+ "deadLetterTargetArn": {
149
+ "Fn::GetAtt": [
150
+ "constructqueuedlq6B66D1E6",
151
+ "Arn"
152
+ ]
153
+ },
154
+ "maxReceiveCount": 15
155
+ }
156
+ },
157
+ "UpdateReplacePolicy": "Delete",
158
+ "DeletionPolicy": "Delete"
159
+ },
160
+ "constructqueuePolicy5B0256B1": {
161
+ "Type": "AWS::SQS::QueuePolicy",
162
+ "Properties": {
163
+ "PolicyDocument": {
164
+ "Statement": [
165
+ {
166
+ "Action": [
167
+ "sqs:AddPermission",
168
+ "sqs:DeleteMessage",
169
+ "sqs:GetQueueAttributes",
170
+ "sqs:ReceiveMessage",
171
+ "sqs:RemovePermission",
172
+ "sqs:SendMessage",
173
+ "sqs:SetQueueAttributes"
174
+ ],
175
+ "Effect": "Allow",
176
+ "Principal": {
177
+ "AWS": {
178
+ "Fn::Join": [
179
+ "",
180
+ [
181
+ "arn:",
182
+ {
183
+ "Ref": "AWS::Partition"
184
+ },
185
+ ":iam::",
186
+ {
187
+ "Ref": "AWS::AccountId"
188
+ },
189
+ ":root"
190
+ ]
191
+ ]
192
+ }
193
+ },
194
+ "Resource": {
195
+ "Fn::GetAtt": [
196
+ "constructqueue481DC1EC",
197
+ "Arn"
198
+ ]
199
+ },
200
+ "Sid": "QueueOwnerOnlyAccess"
201
+ },
202
+ {
203
+ "Action": "SQS:*",
204
+ "Condition": {
205
+ "Bool": {
206
+ "aws:SecureTransport": "false"
207
+ }
208
+ },
209
+ "Effect": "Deny",
210
+ "Principal": {
211
+ "AWS": "*"
212
+ },
213
+ "Resource": {
214
+ "Fn::GetAtt": [
215
+ "constructqueue481DC1EC",
216
+ "Arn"
217
+ ]
218
+ },
219
+ "Sid": "HttpsOnly"
220
+ },
221
+ {
222
+ "Action": [
223
+ "sqs:GetQueueAttributes",
224
+ "sqs:GetQueueUrl",
225
+ "sqs:SendMessage"
226
+ ],
227
+ "Condition": {
228
+ "StringEquals": {
229
+ "aws:SourceAccount": {
230
+ "Ref": "AWS::AccountId"
231
+ }
232
+ }
233
+ },
234
+ "Effect": "Allow",
235
+ "Principal": {
236
+ "Service": "events.amazonaws.com"
237
+ },
238
+ "Resource": {
239
+ "Fn::GetAtt": [
240
+ "constructqueue481DC1EC",
241
+ "Arn"
242
+ ]
243
+ }
244
+ }
245
+ ],
246
+ "Version": "2012-10-17"
247
+ },
248
+ "Queues": [
249
+ {
250
+ "Ref": "constructqueue481DC1EC"
251
+ }
252
+ ]
253
+ }
254
+ },
255
+ "constructruleDlqKey4F9EAB36": {
256
+ "Type": "AWS::KMS::Key",
257
+ "Properties": {
258
+ "EnableKeyRotation": true,
259
+ "KeyPolicy": {
260
+ "Statement": [
261
+ {
262
+ "Action": "kms:*",
263
+ "Effect": "Allow",
264
+ "Principal": {
265
+ "AWS": {
266
+ "Fn::Join": [
267
+ "",
268
+ [
269
+ "arn:",
270
+ {
271
+ "Ref": "AWS::Partition"
272
+ },
273
+ ":iam::",
274
+ {
275
+ "Ref": "AWS::AccountId"
276
+ },
277
+ ":root"
278
+ ]
279
+ ]
280
+ }
281
+ },
282
+ "Resource": "*"
283
+ },
284
+ {
285
+ "Action": [
286
+ "kms:Decrypt",
287
+ "kms:Encrypt",
288
+ "kms:GenerateDataKey*",
289
+ "kms:ReEncrypt*"
290
+ ],
291
+ "Effect": "Allow",
292
+ "Principal": {
293
+ "Service": "events.amazonaws.com"
294
+ },
295
+ "Resource": "*"
296
+ }
297
+ ],
298
+ "Version": "2012-10-17"
299
+ }
300
+ },
301
+ "UpdateReplacePolicy": "Retain",
302
+ "DeletionPolicy": "Retain"
303
+ },
304
+ "constructruleDlqKeyAliasF2A45A01": {
305
+ "Type": "AWS::KMS::Alias",
306
+ "Properties": {
307
+ "AliasName": "alias/test-alias",
308
+ "TargetKeyId": {
309
+ "Fn::GetAtt": [
310
+ "constructruleDlqKey4F9EAB36",
311
+ "Arn"
312
+ ]
313
+ }
314
+ }
315
+ },
316
+ "constructruleDlq7D359AE9": {
317
+ "Type": "AWS::SQS::Queue",
318
+ "Properties": {
319
+ "KmsMasterKeyId": {
320
+ "Fn::GetAtt": [
321
+ "constructruleDlqKey4F9EAB36",
322
+ "Arn"
323
+ ]
324
+ }
325
+ },
326
+ "UpdateReplacePolicy": "Delete",
327
+ "DeletionPolicy": "Delete"
328
+ },
329
+ "constructruleDlqPolicyE4AB8569": {
330
+ "Type": "AWS::SQS::QueuePolicy",
331
+ "Properties": {
332
+ "PolicyDocument": {
333
+ "Statement": [
334
+ {
335
+ "Action": [
336
+ "sqs:AddPermission",
337
+ "sqs:DeleteMessage",
338
+ "sqs:GetQueueAttributes",
339
+ "sqs:ReceiveMessage",
340
+ "sqs:RemovePermission",
341
+ "sqs:SendMessage",
342
+ "sqs:SetQueueAttributes"
343
+ ],
344
+ "Effect": "Allow",
345
+ "Principal": {
346
+ "AWS": {
347
+ "Fn::Join": [
348
+ "",
349
+ [
350
+ "arn:",
351
+ {
352
+ "Ref": "AWS::Partition"
353
+ },
354
+ ":iam::",
355
+ {
356
+ "Ref": "AWS::AccountId"
357
+ },
358
+ ":root"
359
+ ]
360
+ ]
361
+ }
362
+ },
363
+ "Resource": {
364
+ "Fn::GetAtt": [
365
+ "constructruleDlq7D359AE9",
366
+ "Arn"
367
+ ]
368
+ },
369
+ "Sid": "QueueOwnerOnlyAccess"
370
+ },
371
+ {
372
+ "Action": "SQS:*",
373
+ "Condition": {
374
+ "Bool": {
375
+ "aws:SecureTransport": "false"
376
+ }
377
+ },
378
+ "Effect": "Deny",
379
+ "Principal": {
380
+ "AWS": "*"
381
+ },
382
+ "Resource": {
383
+ "Fn::GetAtt": [
384
+ "constructruleDlq7D359AE9",
385
+ "Arn"
386
+ ]
387
+ },
388
+ "Sid": "HttpsOnly"
389
+ },
390
+ {
391
+ "Action": "sqs:SendMessage",
392
+ "Condition": {
393
+ "ArnEquals": {
394
+ "aws:SourceArn": {
395
+ "Fn::GetAtt": [
396
+ "constructEventsRule43880ADB",
397
+ "Arn"
398
+ ]
399
+ }
400
+ }
401
+ },
402
+ "Effect": "Allow",
403
+ "Principal": {
404
+ "Service": "events.amazonaws.com"
405
+ },
406
+ "Resource": {
407
+ "Fn::GetAtt": [
408
+ "constructruleDlq7D359AE9",
409
+ "Arn"
410
+ ]
411
+ },
412
+ "Sid": "AllowEventRuleevtsqsruledlqconstructEventsRule62503343"
413
+ }
414
+ ],
415
+ "Version": "2012-10-17"
416
+ },
417
+ "Queues": [
418
+ {
419
+ "Ref": "constructruleDlq7D359AE9"
420
+ }
421
+ ]
422
+ }
423
+ },
424
+ "constructEventsRule43880ADB": {
425
+ "Type": "AWS::Events::Rule",
426
+ "Properties": {
427
+ "ScheduleExpression": "rate(1 minute)",
428
+ "State": "ENABLED",
429
+ "Targets": [
430
+ {
431
+ "Arn": {
432
+ "Fn::GetAtt": [
433
+ "constructqueue481DC1EC",
434
+ "Arn"
435
+ ]
436
+ },
437
+ "DeadLetterConfig": {
438
+ "Arn": {
439
+ "Fn::GetAtt": [
440
+ "constructruleDlq7D359AE9",
441
+ "Arn"
442
+ ]
443
+ }
444
+ },
445
+ "Id": "Target0"
446
+ }
447
+ ]
448
+ }
449
+ }
450
+ },
451
+ "Parameters": {
452
+ "BootstrapVersion": {
453
+ "Type": "AWS::SSM::Parameter::Value<String>",
454
+ "Default": "/cdk-bootstrap/hnb659fds/version",
455
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
456
+ }
457
+ },
458
+ "Rules": {
459
+ "CheckBootstrapVersion": {
460
+ "Assertions": [
461
+ {
462
+ "Assert": {
463
+ "Fn::Not": [
464
+ {
465
+ "Fn::Contains": [
466
+ [
467
+ "1",
468
+ "2",
469
+ "3",
470
+ "4",
471
+ "5"
472
+ ],
473
+ {
474
+ "Ref": "BootstrapVersion"
475
+ }
476
+ ]
477
+ }
478
+ ]
479
+ },
480
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
481
+ }
482
+ ]
483
+ }
484
+ }
485
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "39.0.0",
3
+ "files": {
4
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5
+ "source": {
6
+ "path": "evtsqsruledlqIntegDefaultTestDeployAssertE0D1E1C2.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
+ }
@@ -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
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "39.0.0",
3
+ "testCases": {
4
+ "evtsqs-rule-dlq/Integ/DefaultTest": {
5
+ "stacks": [
6
+ "evtsqs-rule-dlq"
7
+ ],
8
+ "assertionStack": "evtsqs-rule-dlq/Integ/DefaultTest/DeployAssert",
9
+ "assertionStackName": "evtsqsruledlqIntegDefaultTestDeployAssertE0D1E1C2"
10
+ }
11
+ }
12
+ }