@aws-solutions-constructs/aws-sqs-lambda 2.50.0 → 2.52.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 (38) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +50 -5
  3. package/integ.config.json +7 -0
  4. package/lib/index.js +1 -1
  5. package/package.json +12 -11
  6. package/test/integ.sqslam-deployFifoQueue.js +5 -2
  7. package/test/integ.sqslam-deployFifoQueue.js.snapshot/asset.0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f/index.js +21 -0
  8. package/test/integ.sqslam-deployFifoQueue.js.snapshot/cdk.out +1 -0
  9. package/test/integ.sqslam-deployFifoQueue.js.snapshot/integ.json +12 -0
  10. package/test/integ.sqslam-deployFifoQueue.js.snapshot/manifest.json +155 -0
  11. package/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.assets.json +32 -0
  12. package/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.template.json +378 -0
  13. package/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslamdeployFifoQueueIntegDefaultTestDeployAssert77FD67F7.assets.json +19 -0
  14. package/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslamdeployFifoQueueIntegDefaultTestDeployAssert77FD67F7.template.json +36 -0
  15. package/test/integ.sqslam-deployFifoQueue.js.snapshot/tree.json +592 -0
  16. package/test/integ.sqslam-deployFunction.js +5 -2
  17. package/test/integ.sqslam-deployFunction.js.snapshot/asset.0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f/index.js +21 -0
  18. package/test/integ.sqslam-deployFunction.js.snapshot/cdk.out +1 -0
  19. package/test/integ.sqslam-deployFunction.js.snapshot/integ.json +12 -0
  20. package/test/integ.sqslam-deployFunction.js.snapshot/manifest.json +155 -0
  21. package/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.assets.json +32 -0
  22. package/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.template.json +374 -0
  23. package/test/integ.sqslam-deployFunction.js.snapshot/sqslamdeployFunctionIntegDefaultTestDeployAssert1ACA7AF2.assets.json +19 -0
  24. package/test/integ.sqslam-deployFunction.js.snapshot/sqslamdeployFunctionIntegDefaultTestDeployAssert1ACA7AF2.template.json +36 -0
  25. package/test/integ.sqslam-deployFunction.js.snapshot/tree.json +588 -0
  26. package/test/integ.sqslam-existingFunction.js +5 -2
  27. package/test/integ.sqslam-existingFunction.js.snapshot/asset.0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f/index.js +21 -0
  28. package/test/integ.sqslam-existingFunction.js.snapshot/cdk.out +1 -0
  29. package/test/integ.sqslam-existingFunction.js.snapshot/integ.json +12 -0
  30. package/test/integ.sqslam-existingFunction.js.snapshot/manifest.json +155 -0
  31. package/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.assets.json +32 -0
  32. package/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.template.json +374 -0
  33. package/test/integ.sqslam-existingFunction.js.snapshot/sqslamexistingFunctionIntegDefaultTestDeployAssert2E8A6942.assets.json +19 -0
  34. package/test/integ.sqslam-existingFunction.js.snapshot/sqslamexistingFunctionIntegDefaultTestDeployAssert2E8A6942.template.json +36 -0
  35. package/test/integ.sqslam-existingFunction.js.snapshot/tree.json +588 -0
  36. package/test/integ.sqslam-deployFifoQueue.expected.json +0 -378
  37. package/test/integ.sqslam-deployFunction.expected.json +0 -374
  38. package/test/integ.sqslam-existingFunction.expected.json +0 -374
@@ -1,378 +0,0 @@
1
- {
2
- "Description": "Integration Test for aws-sqs-lambda with FIFO Queue",
3
- "Resources": {
4
- "testsqslambdafifoLambdaFunctionServiceRole74463822": {
5
- "Type": "AWS::IAM::Role",
6
- "Properties": {
7
- "AssumeRolePolicyDocument": {
8
- "Statement": [
9
- {
10
- "Action": "sts:AssumeRole",
11
- "Effect": "Allow",
12
- "Principal": {
13
- "Service": "lambda.amazonaws.com"
14
- }
15
- }
16
- ],
17
- "Version": "2012-10-17"
18
- },
19
- "Policies": [
20
- {
21
- "PolicyDocument": {
22
- "Statement": [
23
- {
24
- "Action": [
25
- "logs:CreateLogGroup",
26
- "logs:CreateLogStream",
27
- "logs:PutLogEvents"
28
- ],
29
- "Effect": "Allow",
30
- "Resource": {
31
- "Fn::Join": [
32
- "",
33
- [
34
- "arn:",
35
- {
36
- "Ref": "AWS::Partition"
37
- },
38
- ":logs:",
39
- {
40
- "Ref": "AWS::Region"
41
- },
42
- ":",
43
- {
44
- "Ref": "AWS::AccountId"
45
- },
46
- ":log-group:/aws/lambda/*"
47
- ]
48
- ]
49
- }
50
- }
51
- ],
52
- "Version": "2012-10-17"
53
- },
54
- "PolicyName": "LambdaFunctionServiceRolePolicy"
55
- }
56
- ]
57
- }
58
- },
59
- "testsqslambdafifoLambdaFunctionServiceRoleDefaultPolicy016B538E": {
60
- "Type": "AWS::IAM::Policy",
61
- "Properties": {
62
- "PolicyDocument": {
63
- "Statement": [
64
- {
65
- "Action": [
66
- "xray:PutTraceSegments",
67
- "xray:PutTelemetryRecords"
68
- ],
69
- "Effect": "Allow",
70
- "Resource": "*"
71
- },
72
- {
73
- "Action": [
74
- "sqs:ReceiveMessage",
75
- "sqs:ChangeMessageVisibility",
76
- "sqs:GetQueueUrl",
77
- "sqs:DeleteMessage",
78
- "sqs:GetQueueAttributes"
79
- ],
80
- "Effect": "Allow",
81
- "Resource": {
82
- "Fn::GetAtt": [
83
- "testsqslambdafifoqueue45DD24D7",
84
- "Arn"
85
- ]
86
- }
87
- }
88
- ],
89
- "Version": "2012-10-17"
90
- },
91
- "PolicyName": "testsqslambdafifoLambdaFunctionServiceRoleDefaultPolicy016B538E",
92
- "Roles": [
93
- {
94
- "Ref": "testsqslambdafifoLambdaFunctionServiceRole74463822"
95
- }
96
- ]
97
- },
98
- "Metadata": {
99
- "cfn_nag": {
100
- "rules_to_suppress": [
101
- {
102
- "id": "W12",
103
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
104
- }
105
- ]
106
- }
107
- }
108
- },
109
- "testsqslambdafifoLambdaFunction0F3AE705": {
110
- "Type": "AWS::Lambda::Function",
111
- "Properties": {
112
- "Code": {
113
- "S3Bucket": {
114
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
115
- },
116
- "S3Key": "0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f.zip"
117
- },
118
- "Environment": {
119
- "Variables": {
120
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
121
- }
122
- },
123
- "Handler": "index.handler",
124
- "Role": {
125
- "Fn::GetAtt": [
126
- "testsqslambdafifoLambdaFunctionServiceRole74463822",
127
- "Arn"
128
- ]
129
- },
130
- "Runtime": "nodejs16.x",
131
- "TracingConfig": {
132
- "Mode": "Active"
133
- }
134
- },
135
- "DependsOn": [
136
- "testsqslambdafifoLambdaFunctionServiceRoleDefaultPolicy016B538E",
137
- "testsqslambdafifoLambdaFunctionServiceRole74463822"
138
- ],
139
- "Metadata": {
140
- "cfn_nag": {
141
- "rules_to_suppress": [
142
- {
143
- "id": "W58",
144
- "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."
145
- },
146
- {
147
- "id": "W89",
148
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
149
- },
150
- {
151
- "id": "W92",
152
- "reason": "Impossible for us to define the correct concurrency for clients"
153
- }
154
- ]
155
- }
156
- }
157
- },
158
- "testsqslambdafifoLambdaFunctionSqsEventSourcesqslamdeployFifoQueuetestsqslambdafifoqueue471FB9167780560F": {
159
- "Type": "AWS::Lambda::EventSourceMapping",
160
- "Properties": {
161
- "EventSourceArn": {
162
- "Fn::GetAtt": [
163
- "testsqslambdafifoqueue45DD24D7",
164
- "Arn"
165
- ]
166
- },
167
- "FunctionName": {
168
- "Ref": "testsqslambdafifoLambdaFunction0F3AE705"
169
- }
170
- }
171
- },
172
- "testsqslambdafifodeadLetterQueue99A41920": {
173
- "Type": "AWS::SQS::Queue",
174
- "Properties": {
175
- "FifoQueue": true,
176
- "KmsMasterKeyId": "alias/aws/sqs",
177
- "QueueName": "myDLQueue.fifo"
178
- },
179
- "UpdateReplacePolicy": "Delete",
180
- "DeletionPolicy": "Delete"
181
- },
182
- "testsqslambdafifodeadLetterQueuePolicy32FA63A7": {
183
- "Type": "AWS::SQS::QueuePolicy",
184
- "Properties": {
185
- "PolicyDocument": {
186
- "Statement": [
187
- {
188
- "Action": [
189
- "sqs:DeleteMessage",
190
- "sqs:ReceiveMessage",
191
- "sqs:SendMessage",
192
- "sqs:GetQueueAttributes",
193
- "sqs:RemovePermission",
194
- "sqs:AddPermission",
195
- "sqs:SetQueueAttributes"
196
- ],
197
- "Effect": "Allow",
198
- "Principal": {
199
- "AWS": {
200
- "Fn::Join": [
201
- "",
202
- [
203
- "arn:",
204
- {
205
- "Ref": "AWS::Partition"
206
- },
207
- ":iam::",
208
- {
209
- "Ref": "AWS::AccountId"
210
- },
211
- ":root"
212
- ]
213
- ]
214
- }
215
- },
216
- "Resource": {
217
- "Fn::GetAtt": [
218
- "testsqslambdafifodeadLetterQueue99A41920",
219
- "Arn"
220
- ]
221
- },
222
- "Sid": "QueueOwnerOnlyAccess"
223
- },
224
- {
225
- "Action": "SQS:*",
226
- "Condition": {
227
- "Bool": {
228
- "aws:SecureTransport": "false"
229
- }
230
- },
231
- "Effect": "Deny",
232
- "Principal": {
233
- "AWS": "*"
234
- },
235
- "Resource": {
236
- "Fn::GetAtt": [
237
- "testsqslambdafifodeadLetterQueue99A41920",
238
- "Arn"
239
- ]
240
- },
241
- "Sid": "HttpsOnly"
242
- }
243
- ],
244
- "Version": "2012-10-17"
245
- },
246
- "Queues": [
247
- {
248
- "Ref": "testsqslambdafifodeadLetterQueue99A41920"
249
- }
250
- ]
251
- }
252
- },
253
- "testsqslambdafifoqueue45DD24D7": {
254
- "Type": "AWS::SQS::Queue",
255
- "Properties": {
256
- "FifoQueue": true,
257
- "KmsMasterKeyId": "alias/aws/sqs",
258
- "QueueName": "myQueue.fifo",
259
- "RedrivePolicy": {
260
- "deadLetterTargetArn": {
261
- "Fn::GetAtt": [
262
- "testsqslambdafifodeadLetterQueue99A41920",
263
- "Arn"
264
- ]
265
- },
266
- "maxReceiveCount": 15
267
- }
268
- },
269
- "UpdateReplacePolicy": "Delete",
270
- "DeletionPolicy": "Delete"
271
- },
272
- "testsqslambdafifoqueuePolicyCCA7CAF9": {
273
- "Type": "AWS::SQS::QueuePolicy",
274
- "Properties": {
275
- "PolicyDocument": {
276
- "Statement": [
277
- {
278
- "Action": [
279
- "sqs:DeleteMessage",
280
- "sqs:ReceiveMessage",
281
- "sqs:SendMessage",
282
- "sqs:GetQueueAttributes",
283
- "sqs:RemovePermission",
284
- "sqs:AddPermission",
285
- "sqs:SetQueueAttributes"
286
- ],
287
- "Effect": "Allow",
288
- "Principal": {
289
- "AWS": {
290
- "Fn::Join": [
291
- "",
292
- [
293
- "arn:",
294
- {
295
- "Ref": "AWS::Partition"
296
- },
297
- ":iam::",
298
- {
299
- "Ref": "AWS::AccountId"
300
- },
301
- ":root"
302
- ]
303
- ]
304
- }
305
- },
306
- "Resource": {
307
- "Fn::GetAtt": [
308
- "testsqslambdafifoqueue45DD24D7",
309
- "Arn"
310
- ]
311
- },
312
- "Sid": "QueueOwnerOnlyAccess"
313
- },
314
- {
315
- "Action": "SQS:*",
316
- "Condition": {
317
- "Bool": {
318
- "aws:SecureTransport": "false"
319
- }
320
- },
321
- "Effect": "Deny",
322
- "Principal": {
323
- "AWS": "*"
324
- },
325
- "Resource": {
326
- "Fn::GetAtt": [
327
- "testsqslambdafifoqueue45DD24D7",
328
- "Arn"
329
- ]
330
- },
331
- "Sid": "HttpsOnly"
332
- }
333
- ],
334
- "Version": "2012-10-17"
335
- },
336
- "Queues": [
337
- {
338
- "Ref": "testsqslambdafifoqueue45DD24D7"
339
- }
340
- ]
341
- }
342
- }
343
- },
344
- "Parameters": {
345
- "BootstrapVersion": {
346
- "Type": "AWS::SSM::Parameter::Value<String>",
347
- "Default": "/cdk-bootstrap/hnb659fds/version",
348
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
349
- }
350
- },
351
- "Rules": {
352
- "CheckBootstrapVersion": {
353
- "Assertions": [
354
- {
355
- "Assert": {
356
- "Fn::Not": [
357
- {
358
- "Fn::Contains": [
359
- [
360
- "1",
361
- "2",
362
- "3",
363
- "4",
364
- "5"
365
- ],
366
- {
367
- "Ref": "BootstrapVersion"
368
- }
369
- ]
370
- }
371
- ]
372
- },
373
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
374
- }
375
- ]
376
- }
377
- }
378
- }