@aws-solutions-constructs/aws-lambda-dynamodb 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 (75) 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.lamddb-add-secondary-index.js +5 -2
  7. package/test/integ.lamddb-add-secondary-index.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  8. package/test/integ.lamddb-add-secondary-index.js.snapshot/cdk.out +1 -0
  9. package/test/integ.lamddb-add-secondary-index.js.snapshot/integ.json +12 -0
  10. package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.assets.json +32 -0
  11. package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.template.json +262 -0
  12. package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddbaddsecondaryindexIntegDefaultTestDeployAssert3193B4D9.assets.json +19 -0
  13. package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddbaddsecondaryindexIntegDefaultTestDeployAssert3193B4D9.template.json +36 -0
  14. package/test/integ.lamddb-add-secondary-index.js.snapshot/manifest.json +131 -0
  15. package/test/integ.lamddb-add-secondary-index.js.snapshot/tree.json +415 -0
  16. package/test/integ.lamddb-deployFunctionWithExistingVpc.js +6 -2
  17. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  18. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  19. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  20. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/cdk.out +1 -0
  21. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/integ.json +12 -0
  22. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.assets.json +45 -0
  23. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.template.json +984 -0
  24. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddbdeployFunctionWithExistingVpcIntegDefaultTestDeployAssertEE08E38E.assets.json +19 -0
  25. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddbdeployFunctionWithExistingVpcIntegDefaultTestDeployAssertEE08E38E.template.json +36 -0
  26. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/manifest.json +323 -0
  27. package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/tree.json +1372 -0
  28. package/test/integ.lamddb-deployFunctionWithVpc.js +6 -2
  29. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  30. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  31. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  32. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/cdk.out +1 -0
  33. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/integ.json +12 -0
  34. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.assets.json +45 -0
  35. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.template.json +694 -0
  36. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddbdeployFunctionWithVpcIntegDefaultTestDeployAssert0AB8275C.assets.json +19 -0
  37. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddbdeployFunctionWithVpcIntegDefaultTestDeployAssert0AB8275C.template.json +36 -0
  38. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/manifest.json +227 -0
  39. package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/tree.json +954 -0
  40. package/test/integ.lamddb-no-arguments.js +5 -2
  41. package/test/integ.lamddb-no-arguments.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  42. package/test/integ.lamddb-no-arguments.js.snapshot/cdk.out +1 -0
  43. package/test/integ.lamddb-no-arguments.js.snapshot/integ.json +12 -0
  44. package/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.assets.json +32 -0
  45. package/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.template.json +233 -0
  46. package/test/integ.lamddb-no-arguments.js.snapshot/lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.assets.json +19 -0
  47. package/test/integ.lamddb-no-arguments.js.snapshot/lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.template.json +36 -0
  48. package/test/integ.lamddb-no-arguments.js.snapshot/manifest.json +131 -0
  49. package/test/integ.lamddb-no-arguments.js.snapshot/tree.json +386 -0
  50. package/test/integ.lamddb-set-billing-mode.js +5 -2
  51. package/test/integ.lamddb-set-billing-mode.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  52. package/test/integ.lamddb-set-billing-mode.js.snapshot/cdk.out +1 -0
  53. package/test/integ.lamddb-set-billing-mode.js.snapshot/integ.json +12 -0
  54. package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.assets.json +32 -0
  55. package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.template.json +246 -0
  56. package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddbsetbillingmodeIntegDefaultTestDeployAssertDAE32272.assets.json +19 -0
  57. package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddbsetbillingmodeIntegDefaultTestDeployAssertDAE32272.template.json +36 -0
  58. package/test/integ.lamddb-set-billing-mode.js.snapshot/manifest.json +131 -0
  59. package/test/integ.lamddb-set-billing-mode.js.snapshot/tree.json +389 -0
  60. package/test/integ.lamddb-use-existing-func.js +5 -2
  61. package/test/integ.lamddb-use-existing-func.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  62. package/test/integ.lamddb-use-existing-func.js.snapshot/cdk.out +1 -0
  63. package/test/integ.lamddb-use-existing-func.js.snapshot/integ.json +12 -0
  64. package/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.assets.json +32 -0
  65. package/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.template.json +233 -0
  66. package/test/integ.lamddb-use-existing-func.js.snapshot/lamddbuseexistingfuncIntegDefaultTestDeployAssert48D284DD.assets.json +19 -0
  67. package/test/integ.lamddb-use-existing-func.js.snapshot/lamddbuseexistingfuncIntegDefaultTestDeployAssert48D284DD.template.json +36 -0
  68. package/test/integ.lamddb-use-existing-func.js.snapshot/manifest.json +131 -0
  69. package/test/integ.lamddb-use-existing-func.js.snapshot/tree.json +386 -0
  70. package/test/integ.lamddb-add-secondary-index.expected.json +0 -262
  71. package/test/integ.lamddb-deployFunctionWithExistingVpc.expected.json +0 -1012
  72. package/test/integ.lamddb-deployFunctionWithVpc.expected.json +0 -609
  73. package/test/integ.lamddb-no-arguments.expected.json +0 -233
  74. package/test/integ.lamddb-set-billing-mode.expected.json +0 -246
  75. package/test/integ.lamddb-use-existing-func.expected.json +0 -233
@@ -0,0 +1,694 @@
1
+ {
2
+ "Description": "Integration Test for aws-lambda-dynamodb",
3
+ "Resources": {
4
+ "testlambdadynamodbstackLambdaFunctionServiceRole758347A1": {
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
+ "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4": {
60
+ "Type": "AWS::IAM::Policy",
61
+ "Properties": {
62
+ "PolicyDocument": {
63
+ "Statement": [
64
+ {
65
+ "Action": [
66
+ "ec2:AssignPrivateIpAddresses",
67
+ "ec2:CreateNetworkInterface",
68
+ "ec2:DeleteNetworkInterface",
69
+ "ec2:DescribeNetworkInterfaces",
70
+ "ec2:UnassignPrivateIpAddresses",
71
+ "xray:PutTelemetryRecords",
72
+ "xray:PutTraceSegments"
73
+ ],
74
+ "Effect": "Allow",
75
+ "Resource": "*"
76
+ },
77
+ {
78
+ "Action": [
79
+ "dynamodb:BatchGetItem",
80
+ "dynamodb:BatchWriteItem",
81
+ "dynamodb:ConditionCheckItem",
82
+ "dynamodb:DeleteItem",
83
+ "dynamodb:DescribeTable",
84
+ "dynamodb:GetItem",
85
+ "dynamodb:GetRecords",
86
+ "dynamodb:GetShardIterator",
87
+ "dynamodb:PutItem",
88
+ "dynamodb:Query",
89
+ "dynamodb:Scan",
90
+ "dynamodb:UpdateItem"
91
+ ],
92
+ "Effect": "Allow",
93
+ "Resource": [
94
+ {
95
+ "Fn::GetAtt": [
96
+ "testlambdadynamodbstackDynamoTable8138E93B",
97
+ "Arn"
98
+ ]
99
+ },
100
+ {
101
+ "Ref": "AWS::NoValue"
102
+ }
103
+ ]
104
+ }
105
+ ],
106
+ "Version": "2012-10-17"
107
+ },
108
+ "PolicyName": "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4",
109
+ "Roles": [
110
+ {
111
+ "Ref": "testlambdadynamodbstackLambdaFunctionServiceRole758347A1"
112
+ }
113
+ ]
114
+ },
115
+ "Metadata": {
116
+ "cfn_nag": {
117
+ "rules_to_suppress": [
118
+ {
119
+ "id": "W12",
120
+ "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
121
+ }
122
+ ]
123
+ }
124
+ }
125
+ },
126
+ "testlambdadynamodbstackReplaceDefaultSecurityGroupsecuritygroup15025C82": {
127
+ "Type": "AWS::EC2::SecurityGroup",
128
+ "Properties": {
129
+ "GroupDescription": "lamddb-deployFunctionWithVpc/test-lambda-dynamodb-stack/ReplaceDefaultSecurityGroup-security-group",
130
+ "SecurityGroupEgress": [
131
+ {
132
+ "CidrIp": "0.0.0.0/0",
133
+ "Description": "Allow all outbound traffic by default",
134
+ "IpProtocol": "-1"
135
+ }
136
+ ],
137
+ "VpcId": {
138
+ "Ref": "Vpc8378EB38"
139
+ }
140
+ },
141
+ "Metadata": {
142
+ "cfn_nag": {
143
+ "rules_to_suppress": [
144
+ {
145
+ "id": "W5",
146
+ "reason": "Egress of 0.0.0.0/0 is default and generally considered OK"
147
+ },
148
+ {
149
+ "id": "W40",
150
+ "reason": "Egress IPProtocol of -1 is default and generally considered OK"
151
+ }
152
+ ]
153
+ }
154
+ }
155
+ },
156
+ "testlambdadynamodbstackLambdaFunction5DDB3E8D": {
157
+ "Type": "AWS::Lambda::Function",
158
+ "Properties": {
159
+ "Code": {
160
+ "S3Bucket": {
161
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
162
+ },
163
+ "S3Key": "0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8.zip"
164
+ },
165
+ "Environment": {
166
+ "Variables": {
167
+ "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
168
+ "DDB_TABLE_NAME": {
169
+ "Ref": "testlambdadynamodbstackDynamoTable8138E93B"
170
+ }
171
+ }
172
+ },
173
+ "Handler": "index.handler",
174
+ "Role": {
175
+ "Fn::GetAtt": [
176
+ "testlambdadynamodbstackLambdaFunctionServiceRole758347A1",
177
+ "Arn"
178
+ ]
179
+ },
180
+ "Runtime": "nodejs16.x",
181
+ "TracingConfig": {
182
+ "Mode": "Active"
183
+ },
184
+ "VpcConfig": {
185
+ "SecurityGroupIds": [
186
+ {
187
+ "Fn::GetAtt": [
188
+ "testlambdadynamodbstackReplaceDefaultSecurityGroupsecuritygroup15025C82",
189
+ "GroupId"
190
+ ]
191
+ }
192
+ ],
193
+ "SubnetIds": [
194
+ {
195
+ "Ref": "VpcisolatedSubnet1SubnetE62B1B9B"
196
+ },
197
+ {
198
+ "Ref": "VpcisolatedSubnet2Subnet39217055"
199
+ }
200
+ ]
201
+ }
202
+ },
203
+ "DependsOn": [
204
+ "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4",
205
+ "testlambdadynamodbstackLambdaFunctionServiceRole758347A1",
206
+ "VpcisolatedSubnet1RouteTableAssociationD259E31A",
207
+ "VpcisolatedSubnet2RouteTableAssociation25A4716F"
208
+ ],
209
+ "Metadata": {
210
+ "cfn_nag": {
211
+ "rules_to_suppress": [
212
+ {
213
+ "id": "W58",
214
+ "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."
215
+ },
216
+ {
217
+ "id": "W89",
218
+ "reason": "This is not a rule for the general case, just for specific use cases/industries"
219
+ },
220
+ {
221
+ "id": "W92",
222
+ "reason": "Impossible for us to define the correct concurrency for clients"
223
+ }
224
+ ]
225
+ }
226
+ }
227
+ },
228
+ "testlambdadynamodbstackDynamoTable8138E93B": {
229
+ "Type": "AWS::DynamoDB::Table",
230
+ "Properties": {
231
+ "AttributeDefinitions": [
232
+ {
233
+ "AttributeName": "id",
234
+ "AttributeType": "S"
235
+ }
236
+ ],
237
+ "BillingMode": "PAY_PER_REQUEST",
238
+ "KeySchema": [
239
+ {
240
+ "AttributeName": "id",
241
+ "KeyType": "HASH"
242
+ }
243
+ ],
244
+ "PointInTimeRecoverySpecification": {
245
+ "PointInTimeRecoveryEnabled": true
246
+ },
247
+ "SSESpecification": {
248
+ "SSEEnabled": true
249
+ }
250
+ },
251
+ "UpdateReplacePolicy": "Retain",
252
+ "DeletionPolicy": "Retain"
253
+ },
254
+ "Vpc8378EB38": {
255
+ "Type": "AWS::EC2::VPC",
256
+ "Properties": {
257
+ "CidrBlock": "10.0.0.0/16",
258
+ "EnableDnsHostnames": true,
259
+ "EnableDnsSupport": true,
260
+ "InstanceTenancy": "default",
261
+ "Tags": [
262
+ {
263
+ "Key": "Name",
264
+ "Value": "lamddb-deployFunctionWithVpc/Vpc"
265
+ }
266
+ ]
267
+ }
268
+ },
269
+ "VpcisolatedSubnet1SubnetE62B1B9B": {
270
+ "Type": "AWS::EC2::Subnet",
271
+ "Properties": {
272
+ "AvailabilityZone": {
273
+ "Fn::Select": [
274
+ 0,
275
+ {
276
+ "Fn::GetAZs": ""
277
+ }
278
+ ]
279
+ },
280
+ "CidrBlock": "10.0.0.0/18",
281
+ "MapPublicIpOnLaunch": false,
282
+ "Tags": [
283
+ {
284
+ "Key": "aws-cdk:subnet-name",
285
+ "Value": "isolated"
286
+ },
287
+ {
288
+ "Key": "aws-cdk:subnet-type",
289
+ "Value": "Isolated"
290
+ },
291
+ {
292
+ "Key": "Name",
293
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/isolatedSubnet1"
294
+ }
295
+ ],
296
+ "VpcId": {
297
+ "Ref": "Vpc8378EB38"
298
+ }
299
+ }
300
+ },
301
+ "VpcisolatedSubnet1RouteTableE442650B": {
302
+ "Type": "AWS::EC2::RouteTable",
303
+ "Properties": {
304
+ "Tags": [
305
+ {
306
+ "Key": "Name",
307
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/isolatedSubnet1"
308
+ }
309
+ ],
310
+ "VpcId": {
311
+ "Ref": "Vpc8378EB38"
312
+ }
313
+ }
314
+ },
315
+ "VpcisolatedSubnet1RouteTableAssociationD259E31A": {
316
+ "Type": "AWS::EC2::SubnetRouteTableAssociation",
317
+ "Properties": {
318
+ "RouteTableId": {
319
+ "Ref": "VpcisolatedSubnet1RouteTableE442650B"
320
+ },
321
+ "SubnetId": {
322
+ "Ref": "VpcisolatedSubnet1SubnetE62B1B9B"
323
+ }
324
+ }
325
+ },
326
+ "VpcisolatedSubnet2Subnet39217055": {
327
+ "Type": "AWS::EC2::Subnet",
328
+ "Properties": {
329
+ "AvailabilityZone": {
330
+ "Fn::Select": [
331
+ 1,
332
+ {
333
+ "Fn::GetAZs": ""
334
+ }
335
+ ]
336
+ },
337
+ "CidrBlock": "10.0.64.0/18",
338
+ "MapPublicIpOnLaunch": false,
339
+ "Tags": [
340
+ {
341
+ "Key": "aws-cdk:subnet-name",
342
+ "Value": "isolated"
343
+ },
344
+ {
345
+ "Key": "aws-cdk:subnet-type",
346
+ "Value": "Isolated"
347
+ },
348
+ {
349
+ "Key": "Name",
350
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/isolatedSubnet2"
351
+ }
352
+ ],
353
+ "VpcId": {
354
+ "Ref": "Vpc8378EB38"
355
+ }
356
+ }
357
+ },
358
+ "VpcisolatedSubnet2RouteTable334F9764": {
359
+ "Type": "AWS::EC2::RouteTable",
360
+ "Properties": {
361
+ "Tags": [
362
+ {
363
+ "Key": "Name",
364
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/isolatedSubnet2"
365
+ }
366
+ ],
367
+ "VpcId": {
368
+ "Ref": "Vpc8378EB38"
369
+ }
370
+ }
371
+ },
372
+ "VpcisolatedSubnet2RouteTableAssociation25A4716F": {
373
+ "Type": "AWS::EC2::SubnetRouteTableAssociation",
374
+ "Properties": {
375
+ "RouteTableId": {
376
+ "Ref": "VpcisolatedSubnet2RouteTable334F9764"
377
+ },
378
+ "SubnetId": {
379
+ "Ref": "VpcisolatedSubnet2Subnet39217055"
380
+ }
381
+ }
382
+ },
383
+ "VpcRestrictDefaultSecurityGroupCustomResourceC73DA2BE": {
384
+ "Type": "Custom::VpcRestrictDefaultSG",
385
+ "Properties": {
386
+ "ServiceToken": {
387
+ "Fn::GetAtt": [
388
+ "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E",
389
+ "Arn"
390
+ ]
391
+ },
392
+ "DefaultSecurityGroupId": {
393
+ "Fn::GetAtt": [
394
+ "Vpc8378EB38",
395
+ "DefaultSecurityGroup"
396
+ ]
397
+ },
398
+ "Account": {
399
+ "Ref": "AWS::AccountId"
400
+ }
401
+ },
402
+ "UpdateReplacePolicy": "Delete",
403
+ "DeletionPolicy": "Delete"
404
+ },
405
+ "VpcFlowLogIAMRole6A475D41": {
406
+ "Type": "AWS::IAM::Role",
407
+ "Properties": {
408
+ "AssumeRolePolicyDocument": {
409
+ "Statement": [
410
+ {
411
+ "Action": "sts:AssumeRole",
412
+ "Effect": "Allow",
413
+ "Principal": {
414
+ "Service": "vpc-flow-logs.amazonaws.com"
415
+ }
416
+ }
417
+ ],
418
+ "Version": "2012-10-17"
419
+ },
420
+ "Tags": [
421
+ {
422
+ "Key": "Name",
423
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/FlowLog"
424
+ }
425
+ ]
426
+ }
427
+ },
428
+ "VpcFlowLogIAMRoleDefaultPolicy406FB995": {
429
+ "Type": "AWS::IAM::Policy",
430
+ "Properties": {
431
+ "PolicyDocument": {
432
+ "Statement": [
433
+ {
434
+ "Action": [
435
+ "logs:CreateLogStream",
436
+ "logs:DescribeLogStreams",
437
+ "logs:PutLogEvents"
438
+ ],
439
+ "Effect": "Allow",
440
+ "Resource": {
441
+ "Fn::GetAtt": [
442
+ "VpcFlowLogLogGroup7B5C56B9",
443
+ "Arn"
444
+ ]
445
+ }
446
+ },
447
+ {
448
+ "Action": "iam:PassRole",
449
+ "Effect": "Allow",
450
+ "Resource": {
451
+ "Fn::GetAtt": [
452
+ "VpcFlowLogIAMRole6A475D41",
453
+ "Arn"
454
+ ]
455
+ }
456
+ }
457
+ ],
458
+ "Version": "2012-10-17"
459
+ },
460
+ "PolicyName": "VpcFlowLogIAMRoleDefaultPolicy406FB995",
461
+ "Roles": [
462
+ {
463
+ "Ref": "VpcFlowLogIAMRole6A475D41"
464
+ }
465
+ ]
466
+ }
467
+ },
468
+ "VpcFlowLogLogGroup7B5C56B9": {
469
+ "Type": "AWS::Logs::LogGroup",
470
+ "Properties": {
471
+ "RetentionInDays": 731,
472
+ "Tags": [
473
+ {
474
+ "Key": "Name",
475
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/FlowLog"
476
+ }
477
+ ]
478
+ },
479
+ "UpdateReplacePolicy": "Retain",
480
+ "DeletionPolicy": "Retain",
481
+ "Metadata": {
482
+ "cfn_nag": {
483
+ "rules_to_suppress": [
484
+ {
485
+ "id": "W84",
486
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
487
+ }
488
+ ]
489
+ }
490
+ }
491
+ },
492
+ "VpcFlowLog8FF33A73": {
493
+ "Type": "AWS::EC2::FlowLog",
494
+ "Properties": {
495
+ "DeliverLogsPermissionArn": {
496
+ "Fn::GetAtt": [
497
+ "VpcFlowLogIAMRole6A475D41",
498
+ "Arn"
499
+ ]
500
+ },
501
+ "LogDestinationType": "cloud-watch-logs",
502
+ "LogGroupName": {
503
+ "Ref": "VpcFlowLogLogGroup7B5C56B9"
504
+ },
505
+ "ResourceId": {
506
+ "Ref": "Vpc8378EB38"
507
+ },
508
+ "ResourceType": "VPC",
509
+ "Tags": [
510
+ {
511
+ "Key": "Name",
512
+ "Value": "lamddb-deployFunctionWithVpc/Vpc/FlowLog"
513
+ }
514
+ ],
515
+ "TrafficType": "ALL"
516
+ }
517
+ },
518
+ "VpcDDB49FBEC5F": {
519
+ "Type": "AWS::EC2::VPCEndpoint",
520
+ "Properties": {
521
+ "RouteTableIds": [
522
+ {
523
+ "Ref": "VpcisolatedSubnet1RouteTableE442650B"
524
+ },
525
+ {
526
+ "Ref": "VpcisolatedSubnet2RouteTable334F9764"
527
+ }
528
+ ],
529
+ "ServiceName": {
530
+ "Fn::Join": [
531
+ "",
532
+ [
533
+ "com.amazonaws.",
534
+ {
535
+ "Ref": "AWS::Region"
536
+ },
537
+ ".dynamodb"
538
+ ]
539
+ ]
540
+ },
541
+ "VpcEndpointType": "Gateway",
542
+ "VpcId": {
543
+ "Ref": "Vpc8378EB38"
544
+ }
545
+ }
546
+ },
547
+ "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0": {
548
+ "Type": "AWS::IAM::Role",
549
+ "Properties": {
550
+ "AssumeRolePolicyDocument": {
551
+ "Version": "2012-10-17",
552
+ "Statement": [
553
+ {
554
+ "Action": "sts:AssumeRole",
555
+ "Effect": "Allow",
556
+ "Principal": {
557
+ "Service": "lambda.amazonaws.com"
558
+ }
559
+ }
560
+ ]
561
+ },
562
+ "ManagedPolicyArns": [
563
+ {
564
+ "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
565
+ }
566
+ ],
567
+ "Policies": [
568
+ {
569
+ "PolicyName": "Inline",
570
+ "PolicyDocument": {
571
+ "Version": "2012-10-17",
572
+ "Statement": [
573
+ {
574
+ "Effect": "Allow",
575
+ "Action": [
576
+ "ec2:AuthorizeSecurityGroupIngress",
577
+ "ec2:AuthorizeSecurityGroupEgress",
578
+ "ec2:RevokeSecurityGroupIngress",
579
+ "ec2:RevokeSecurityGroupEgress"
580
+ ],
581
+ "Resource": [
582
+ {
583
+ "Fn::Join": [
584
+ "",
585
+ [
586
+ "arn:",
587
+ {
588
+ "Ref": "AWS::Partition"
589
+ },
590
+ ":ec2:",
591
+ {
592
+ "Ref": "AWS::Region"
593
+ },
594
+ ":",
595
+ {
596
+ "Ref": "AWS::AccountId"
597
+ },
598
+ ":security-group/",
599
+ {
600
+ "Fn::GetAtt": [
601
+ "Vpc8378EB38",
602
+ "DefaultSecurityGroup"
603
+ ]
604
+ }
605
+ ]
606
+ ]
607
+ }
608
+ ]
609
+ }
610
+ ]
611
+ }
612
+ }
613
+ ]
614
+ }
615
+ },
616
+ "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E": {
617
+ "Type": "AWS::Lambda::Function",
618
+ "Properties": {
619
+ "Code": {
620
+ "S3Bucket": {
621
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
622
+ },
623
+ "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip"
624
+ },
625
+ "Timeout": 900,
626
+ "MemorySize": 128,
627
+ "Handler": "__entrypoint__.handler",
628
+ "Role": {
629
+ "Fn::GetAtt": [
630
+ "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0",
631
+ "Arn"
632
+ ]
633
+ },
634
+ "Runtime": "nodejs18.x",
635
+ "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group"
636
+ },
637
+ "DependsOn": [
638
+ "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0"
639
+ ],
640
+ "Metadata": {
641
+ "cfn_nag": {
642
+ "rules_to_suppress": [
643
+ {
644
+ "id": "W58",
645
+ "reason": "CDK generated custom resource"
646
+ },
647
+ {
648
+ "id": "W89",
649
+ "reason": "CDK generated custom resource"
650
+ },
651
+ {
652
+ "id": "W92",
653
+ "reason": "CDK generated custom resource"
654
+ }
655
+ ]
656
+ }
657
+ }
658
+ }
659
+ },
660
+ "Parameters": {
661
+ "BootstrapVersion": {
662
+ "Type": "AWS::SSM::Parameter::Value<String>",
663
+ "Default": "/cdk-bootstrap/hnb659fds/version",
664
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
665
+ }
666
+ },
667
+ "Rules": {
668
+ "CheckBootstrapVersion": {
669
+ "Assertions": [
670
+ {
671
+ "Assert": {
672
+ "Fn::Not": [
673
+ {
674
+ "Fn::Contains": [
675
+ [
676
+ "1",
677
+ "2",
678
+ "3",
679
+ "4",
680
+ "5"
681
+ ],
682
+ {
683
+ "Ref": "BootstrapVersion"
684
+ }
685
+ ]
686
+ }
687
+ ]
688
+ },
689
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
690
+ }
691
+ ]
692
+ }
693
+ }
694
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "files": {
4
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5
+ "source": {
6
+ "path": "lamddbdeployFunctionWithVpcIntegDefaultTestDeployAssert0AB8275C.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
+ }