@aws-solutions-constructs/aws-lambda-dynamodb 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 (75) 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.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
@@ -1,1012 +0,0 @@
1
- {
2
- "Description": "Integration Test for aws-lambda-dynamodb",
3
- "Resources": {
4
- "Vpc8378EB38": {
5
- "Type": "AWS::EC2::VPC",
6
- "Properties": {
7
- "CidrBlock": "10.0.0.0/16",
8
- "EnableDnsHostnames": true,
9
- "EnableDnsSupport": true,
10
- "InstanceTenancy": "default",
11
- "Tags": [
12
- {
13
- "Key": "Name",
14
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc"
15
- }
16
- ]
17
- }
18
- },
19
- "VpcPublicSubnet1Subnet5C2D37C4": {
20
- "Type": "AWS::EC2::Subnet",
21
- "Properties": {
22
- "AvailabilityZone": "test-region-1a",
23
- "CidrBlock": "10.0.0.0/19",
24
- "MapPublicIpOnLaunch": true,
25
- "Tags": [
26
- {
27
- "Key": "aws-cdk:subnet-name",
28
- "Value": "Public"
29
- },
30
- {
31
- "Key": "aws-cdk:subnet-type",
32
- "Value": "Public"
33
- },
34
- {
35
- "Key": "Name",
36
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet1"
37
- }
38
- ],
39
- "VpcId": {
40
- "Ref": "Vpc8378EB38"
41
- }
42
- },
43
- "Metadata": {
44
- "cfn_nag": {
45
- "rules_to_suppress": [
46
- {
47
- "id": "W33",
48
- "reason": "Allow Public Subnets to have MapPublicIpOnLaunch set to true"
49
- }
50
- ]
51
- }
52
- }
53
- },
54
- "VpcPublicSubnet1RouteTable6C95E38E": {
55
- "Type": "AWS::EC2::RouteTable",
56
- "Properties": {
57
- "Tags": [
58
- {
59
- "Key": "Name",
60
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet1"
61
- }
62
- ],
63
- "VpcId": {
64
- "Ref": "Vpc8378EB38"
65
- }
66
- }
67
- },
68
- "VpcPublicSubnet1RouteTableAssociation97140677": {
69
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
70
- "Properties": {
71
- "RouteTableId": {
72
- "Ref": "VpcPublicSubnet1RouteTable6C95E38E"
73
- },
74
- "SubnetId": {
75
- "Ref": "VpcPublicSubnet1Subnet5C2D37C4"
76
- }
77
- }
78
- },
79
- "VpcPublicSubnet1DefaultRoute3DA9E72A": {
80
- "Type": "AWS::EC2::Route",
81
- "Properties": {
82
- "DestinationCidrBlock": "0.0.0.0/0",
83
- "GatewayId": {
84
- "Ref": "VpcIGWD7BA715C"
85
- },
86
- "RouteTableId": {
87
- "Ref": "VpcPublicSubnet1RouteTable6C95E38E"
88
- }
89
- },
90
- "DependsOn": [
91
- "VpcVPCGWBF912B6E"
92
- ]
93
- },
94
- "VpcPublicSubnet1EIPD7E02669": {
95
- "Type": "AWS::EC2::EIP",
96
- "Properties": {
97
- "Domain": "vpc",
98
- "Tags": [
99
- {
100
- "Key": "Name",
101
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet1"
102
- }
103
- ]
104
- }
105
- },
106
- "VpcPublicSubnet1NATGateway4D7517AA": {
107
- "Type": "AWS::EC2::NatGateway",
108
- "Properties": {
109
- "AllocationId": {
110
- "Fn::GetAtt": [
111
- "VpcPublicSubnet1EIPD7E02669",
112
- "AllocationId"
113
- ]
114
- },
115
- "SubnetId": {
116
- "Ref": "VpcPublicSubnet1Subnet5C2D37C4"
117
- },
118
- "Tags": [
119
- {
120
- "Key": "Name",
121
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet1"
122
- }
123
- ]
124
- },
125
- "DependsOn": [
126
- "VpcPublicSubnet1DefaultRoute3DA9E72A",
127
- "VpcPublicSubnet1RouteTableAssociation97140677"
128
- ]
129
- },
130
- "VpcPublicSubnet2Subnet691E08A3": {
131
- "Type": "AWS::EC2::Subnet",
132
- "Properties": {
133
- "AvailabilityZone": "test-region-1b",
134
- "CidrBlock": "10.0.32.0/19",
135
- "MapPublicIpOnLaunch": true,
136
- "Tags": [
137
- {
138
- "Key": "aws-cdk:subnet-name",
139
- "Value": "Public"
140
- },
141
- {
142
- "Key": "aws-cdk:subnet-type",
143
- "Value": "Public"
144
- },
145
- {
146
- "Key": "Name",
147
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet2"
148
- }
149
- ],
150
- "VpcId": {
151
- "Ref": "Vpc8378EB38"
152
- }
153
- },
154
- "Metadata": {
155
- "cfn_nag": {
156
- "rules_to_suppress": [
157
- {
158
- "id": "W33",
159
- "reason": "Allow Public Subnets to have MapPublicIpOnLaunch set to true"
160
- }
161
- ]
162
- }
163
- }
164
- },
165
- "VpcPublicSubnet2RouteTable94F7E489": {
166
- "Type": "AWS::EC2::RouteTable",
167
- "Properties": {
168
- "Tags": [
169
- {
170
- "Key": "Name",
171
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet2"
172
- }
173
- ],
174
- "VpcId": {
175
- "Ref": "Vpc8378EB38"
176
- }
177
- }
178
- },
179
- "VpcPublicSubnet2RouteTableAssociationDD5762D8": {
180
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
181
- "Properties": {
182
- "RouteTableId": {
183
- "Ref": "VpcPublicSubnet2RouteTable94F7E489"
184
- },
185
- "SubnetId": {
186
- "Ref": "VpcPublicSubnet2Subnet691E08A3"
187
- }
188
- }
189
- },
190
- "VpcPublicSubnet2DefaultRoute97F91067": {
191
- "Type": "AWS::EC2::Route",
192
- "Properties": {
193
- "DestinationCidrBlock": "0.0.0.0/0",
194
- "GatewayId": {
195
- "Ref": "VpcIGWD7BA715C"
196
- },
197
- "RouteTableId": {
198
- "Ref": "VpcPublicSubnet2RouteTable94F7E489"
199
- }
200
- },
201
- "DependsOn": [
202
- "VpcVPCGWBF912B6E"
203
- ]
204
- },
205
- "VpcPublicSubnet2EIP3C605A87": {
206
- "Type": "AWS::EC2::EIP",
207
- "Properties": {
208
- "Domain": "vpc",
209
- "Tags": [
210
- {
211
- "Key": "Name",
212
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet2"
213
- }
214
- ]
215
- }
216
- },
217
- "VpcPublicSubnet2NATGateway9182C01D": {
218
- "Type": "AWS::EC2::NatGateway",
219
- "Properties": {
220
- "AllocationId": {
221
- "Fn::GetAtt": [
222
- "VpcPublicSubnet2EIP3C605A87",
223
- "AllocationId"
224
- ]
225
- },
226
- "SubnetId": {
227
- "Ref": "VpcPublicSubnet2Subnet691E08A3"
228
- },
229
- "Tags": [
230
- {
231
- "Key": "Name",
232
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet2"
233
- }
234
- ]
235
- },
236
- "DependsOn": [
237
- "VpcPublicSubnet2DefaultRoute97F91067",
238
- "VpcPublicSubnet2RouteTableAssociationDD5762D8"
239
- ]
240
- },
241
- "VpcPublicSubnet3SubnetBE12F0B6": {
242
- "Type": "AWS::EC2::Subnet",
243
- "Properties": {
244
- "AvailabilityZone": "test-region-1c",
245
- "CidrBlock": "10.0.64.0/19",
246
- "MapPublicIpOnLaunch": true,
247
- "Tags": [
248
- {
249
- "Key": "aws-cdk:subnet-name",
250
- "Value": "Public"
251
- },
252
- {
253
- "Key": "aws-cdk:subnet-type",
254
- "Value": "Public"
255
- },
256
- {
257
- "Key": "Name",
258
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet3"
259
- }
260
- ],
261
- "VpcId": {
262
- "Ref": "Vpc8378EB38"
263
- }
264
- },
265
- "Metadata": {
266
- "cfn_nag": {
267
- "rules_to_suppress": [
268
- {
269
- "id": "W33",
270
- "reason": "Allow Public Subnets to have MapPublicIpOnLaunch set to true"
271
- }
272
- ]
273
- }
274
- }
275
- },
276
- "VpcPublicSubnet3RouteTable93458DBB": {
277
- "Type": "AWS::EC2::RouteTable",
278
- "Properties": {
279
- "Tags": [
280
- {
281
- "Key": "Name",
282
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet3"
283
- }
284
- ],
285
- "VpcId": {
286
- "Ref": "Vpc8378EB38"
287
- }
288
- }
289
- },
290
- "VpcPublicSubnet3RouteTableAssociation1F1EDF02": {
291
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
292
- "Properties": {
293
- "RouteTableId": {
294
- "Ref": "VpcPublicSubnet3RouteTable93458DBB"
295
- },
296
- "SubnetId": {
297
- "Ref": "VpcPublicSubnet3SubnetBE12F0B6"
298
- }
299
- }
300
- },
301
- "VpcPublicSubnet3DefaultRoute4697774F": {
302
- "Type": "AWS::EC2::Route",
303
- "Properties": {
304
- "DestinationCidrBlock": "0.0.0.0/0",
305
- "GatewayId": {
306
- "Ref": "VpcIGWD7BA715C"
307
- },
308
- "RouteTableId": {
309
- "Ref": "VpcPublicSubnet3RouteTable93458DBB"
310
- }
311
- },
312
- "DependsOn": [
313
- "VpcVPCGWBF912B6E"
314
- ]
315
- },
316
- "VpcPublicSubnet3EIP3A666A23": {
317
- "Type": "AWS::EC2::EIP",
318
- "Properties": {
319
- "Domain": "vpc",
320
- "Tags": [
321
- {
322
- "Key": "Name",
323
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet3"
324
- }
325
- ]
326
- }
327
- },
328
- "VpcPublicSubnet3NATGateway7640CD1D": {
329
- "Type": "AWS::EC2::NatGateway",
330
- "Properties": {
331
- "AllocationId": {
332
- "Fn::GetAtt": [
333
- "VpcPublicSubnet3EIP3A666A23",
334
- "AllocationId"
335
- ]
336
- },
337
- "SubnetId": {
338
- "Ref": "VpcPublicSubnet3SubnetBE12F0B6"
339
- },
340
- "Tags": [
341
- {
342
- "Key": "Name",
343
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet3"
344
- }
345
- ]
346
- },
347
- "DependsOn": [
348
- "VpcPublicSubnet3DefaultRoute4697774F",
349
- "VpcPublicSubnet3RouteTableAssociation1F1EDF02"
350
- ]
351
- },
352
- "VpcPrivateSubnet1Subnet536B997A": {
353
- "Type": "AWS::EC2::Subnet",
354
- "Properties": {
355
- "AvailabilityZone": "test-region-1a",
356
- "CidrBlock": "10.0.96.0/19",
357
- "MapPublicIpOnLaunch": false,
358
- "Tags": [
359
- {
360
- "Key": "aws-cdk:subnet-name",
361
- "Value": "Private"
362
- },
363
- {
364
- "Key": "aws-cdk:subnet-type",
365
- "Value": "Private"
366
- },
367
- {
368
- "Key": "Name",
369
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet1"
370
- }
371
- ],
372
- "VpcId": {
373
- "Ref": "Vpc8378EB38"
374
- }
375
- }
376
- },
377
- "VpcPrivateSubnet1RouteTableB2C5B500": {
378
- "Type": "AWS::EC2::RouteTable",
379
- "Properties": {
380
- "Tags": [
381
- {
382
- "Key": "Name",
383
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet1"
384
- }
385
- ],
386
- "VpcId": {
387
- "Ref": "Vpc8378EB38"
388
- }
389
- }
390
- },
391
- "VpcPrivateSubnet1RouteTableAssociation70C59FA6": {
392
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
393
- "Properties": {
394
- "RouteTableId": {
395
- "Ref": "VpcPrivateSubnet1RouteTableB2C5B500"
396
- },
397
- "SubnetId": {
398
- "Ref": "VpcPrivateSubnet1Subnet536B997A"
399
- }
400
- }
401
- },
402
- "VpcPrivateSubnet1DefaultRouteBE02A9ED": {
403
- "Type": "AWS::EC2::Route",
404
- "Properties": {
405
- "DestinationCidrBlock": "0.0.0.0/0",
406
- "NatGatewayId": {
407
- "Ref": "VpcPublicSubnet1NATGateway4D7517AA"
408
- },
409
- "RouteTableId": {
410
- "Ref": "VpcPrivateSubnet1RouteTableB2C5B500"
411
- }
412
- }
413
- },
414
- "VpcPrivateSubnet2Subnet3788AAA1": {
415
- "Type": "AWS::EC2::Subnet",
416
- "Properties": {
417
- "AvailabilityZone": "test-region-1b",
418
- "CidrBlock": "10.0.128.0/19",
419
- "MapPublicIpOnLaunch": false,
420
- "Tags": [
421
- {
422
- "Key": "aws-cdk:subnet-name",
423
- "Value": "Private"
424
- },
425
- {
426
- "Key": "aws-cdk:subnet-type",
427
- "Value": "Private"
428
- },
429
- {
430
- "Key": "Name",
431
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet2"
432
- }
433
- ],
434
- "VpcId": {
435
- "Ref": "Vpc8378EB38"
436
- }
437
- }
438
- },
439
- "VpcPrivateSubnet2RouteTableA678073B": {
440
- "Type": "AWS::EC2::RouteTable",
441
- "Properties": {
442
- "Tags": [
443
- {
444
- "Key": "Name",
445
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet2"
446
- }
447
- ],
448
- "VpcId": {
449
- "Ref": "Vpc8378EB38"
450
- }
451
- }
452
- },
453
- "VpcPrivateSubnet2RouteTableAssociationA89CAD56": {
454
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
455
- "Properties": {
456
- "RouteTableId": {
457
- "Ref": "VpcPrivateSubnet2RouteTableA678073B"
458
- },
459
- "SubnetId": {
460
- "Ref": "VpcPrivateSubnet2Subnet3788AAA1"
461
- }
462
- }
463
- },
464
- "VpcPrivateSubnet2DefaultRoute060D2087": {
465
- "Type": "AWS::EC2::Route",
466
- "Properties": {
467
- "DestinationCidrBlock": "0.0.0.0/0",
468
- "NatGatewayId": {
469
- "Ref": "VpcPublicSubnet2NATGateway9182C01D"
470
- },
471
- "RouteTableId": {
472
- "Ref": "VpcPrivateSubnet2RouteTableA678073B"
473
- }
474
- }
475
- },
476
- "VpcPrivateSubnet3SubnetF258B56E": {
477
- "Type": "AWS::EC2::Subnet",
478
- "Properties": {
479
- "AvailabilityZone": "test-region-1c",
480
- "CidrBlock": "10.0.160.0/19",
481
- "MapPublicIpOnLaunch": false,
482
- "Tags": [
483
- {
484
- "Key": "aws-cdk:subnet-name",
485
- "Value": "Private"
486
- },
487
- {
488
- "Key": "aws-cdk:subnet-type",
489
- "Value": "Private"
490
- },
491
- {
492
- "Key": "Name",
493
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet3"
494
- }
495
- ],
496
- "VpcId": {
497
- "Ref": "Vpc8378EB38"
498
- }
499
- }
500
- },
501
- "VpcPrivateSubnet3RouteTableD98824C7": {
502
- "Type": "AWS::EC2::RouteTable",
503
- "Properties": {
504
- "Tags": [
505
- {
506
- "Key": "Name",
507
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet3"
508
- }
509
- ],
510
- "VpcId": {
511
- "Ref": "Vpc8378EB38"
512
- }
513
- }
514
- },
515
- "VpcPrivateSubnet3RouteTableAssociation16BDDC43": {
516
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
517
- "Properties": {
518
- "RouteTableId": {
519
- "Ref": "VpcPrivateSubnet3RouteTableD98824C7"
520
- },
521
- "SubnetId": {
522
- "Ref": "VpcPrivateSubnet3SubnetF258B56E"
523
- }
524
- }
525
- },
526
- "VpcPrivateSubnet3DefaultRoute94B74F0D": {
527
- "Type": "AWS::EC2::Route",
528
- "Properties": {
529
- "DestinationCidrBlock": "0.0.0.0/0",
530
- "NatGatewayId": {
531
- "Ref": "VpcPublicSubnet3NATGateway7640CD1D"
532
- },
533
- "RouteTableId": {
534
- "Ref": "VpcPrivateSubnet3RouteTableD98824C7"
535
- }
536
- }
537
- },
538
- "VpcIGWD7BA715C": {
539
- "Type": "AWS::EC2::InternetGateway",
540
- "Properties": {
541
- "Tags": [
542
- {
543
- "Key": "Name",
544
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc"
545
- }
546
- ]
547
- }
548
- },
549
- "VpcVPCGWBF912B6E": {
550
- "Type": "AWS::EC2::VPCGatewayAttachment",
551
- "Properties": {
552
- "InternetGatewayId": {
553
- "Ref": "VpcIGWD7BA715C"
554
- },
555
- "VpcId": {
556
- "Ref": "Vpc8378EB38"
557
- }
558
- }
559
- },
560
- "VpcFlowLogIAMRole6A475D41": {
561
- "Type": "AWS::IAM::Role",
562
- "Properties": {
563
- "AssumeRolePolicyDocument": {
564
- "Statement": [
565
- {
566
- "Action": "sts:AssumeRole",
567
- "Effect": "Allow",
568
- "Principal": {
569
- "Service": "vpc-flow-logs.amazonaws.com"
570
- }
571
- }
572
- ],
573
- "Version": "2012-10-17"
574
- },
575
- "Tags": [
576
- {
577
- "Key": "Name",
578
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/FlowLog"
579
- }
580
- ]
581
- }
582
- },
583
- "VpcFlowLogIAMRoleDefaultPolicy406FB995": {
584
- "Type": "AWS::IAM::Policy",
585
- "Properties": {
586
- "PolicyDocument": {
587
- "Statement": [
588
- {
589
- "Action": [
590
- "logs:CreateLogStream",
591
- "logs:PutLogEvents",
592
- "logs:DescribeLogStreams"
593
- ],
594
- "Effect": "Allow",
595
- "Resource": {
596
- "Fn::GetAtt": [
597
- "VpcFlowLogLogGroup7B5C56B9",
598
- "Arn"
599
- ]
600
- }
601
- },
602
- {
603
- "Action": "iam:PassRole",
604
- "Effect": "Allow",
605
- "Resource": {
606
- "Fn::GetAtt": [
607
- "VpcFlowLogIAMRole6A475D41",
608
- "Arn"
609
- ]
610
- }
611
- }
612
- ],
613
- "Version": "2012-10-17"
614
- },
615
- "PolicyName": "VpcFlowLogIAMRoleDefaultPolicy406FB995",
616
- "Roles": [
617
- {
618
- "Ref": "VpcFlowLogIAMRole6A475D41"
619
- }
620
- ]
621
- }
622
- },
623
- "VpcFlowLogLogGroup7B5C56B9": {
624
- "Type": "AWS::Logs::LogGroup",
625
- "Properties": {
626
- "RetentionInDays": 731,
627
- "Tags": [
628
- {
629
- "Key": "Name",
630
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/FlowLog"
631
- }
632
- ]
633
- },
634
- "UpdateReplacePolicy": "Retain",
635
- "DeletionPolicy": "Retain",
636
- "Metadata": {
637
- "cfn_nag": {
638
- "rules_to_suppress": [
639
- {
640
- "id": "W84",
641
- "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
642
- }
643
- ]
644
- }
645
- }
646
- },
647
- "VpcFlowLog8FF33A73": {
648
- "Type": "AWS::EC2::FlowLog",
649
- "Properties": {
650
- "DeliverLogsPermissionArn": {
651
- "Fn::GetAtt": [
652
- "VpcFlowLogIAMRole6A475D41",
653
- "Arn"
654
- ]
655
- },
656
- "LogDestinationType": "cloud-watch-logs",
657
- "LogGroupName": {
658
- "Ref": "VpcFlowLogLogGroup7B5C56B9"
659
- },
660
- "ResourceId": {
661
- "Ref": "Vpc8378EB38"
662
- },
663
- "ResourceType": "VPC",
664
- "Tags": [
665
- {
666
- "Key": "Name",
667
- "Value": "lamddb-deployFunctionWithExistingVpc/Vpc/FlowLog"
668
- }
669
- ],
670
- "TrafficType": "ALL"
671
- }
672
- },
673
- "VpcDDB49FBEC5F": {
674
- "Type": "AWS::EC2::VPCEndpoint",
675
- "Properties": {
676
- "RouteTableIds": [
677
- {
678
- "Ref": "VpcPrivateSubnet1RouteTableB2C5B500"
679
- },
680
- {
681
- "Ref": "VpcPrivateSubnet2RouteTableA678073B"
682
- },
683
- {
684
- "Ref": "VpcPrivateSubnet3RouteTableD98824C7"
685
- },
686
- {
687
- "Ref": "VpcPublicSubnet1RouteTable6C95E38E"
688
- },
689
- {
690
- "Ref": "VpcPublicSubnet2RouteTable94F7E489"
691
- },
692
- {
693
- "Ref": "VpcPublicSubnet3RouteTable93458DBB"
694
- }
695
- ],
696
- "ServiceName": {
697
- "Fn::Join": [
698
- "",
699
- [
700
- "com.amazonaws.",
701
- {
702
- "Ref": "AWS::Region"
703
- },
704
- ".dynamodb"
705
- ]
706
- ]
707
- },
708
- "VpcEndpointType": "Gateway",
709
- "VpcId": {
710
- "Ref": "Vpc8378EB38"
711
- }
712
- }
713
- },
714
- "testlambdadynamodbstackLambdaFunctionServiceRole758347A1": {
715
- "Type": "AWS::IAM::Role",
716
- "Properties": {
717
- "AssumeRolePolicyDocument": {
718
- "Statement": [
719
- {
720
- "Action": "sts:AssumeRole",
721
- "Effect": "Allow",
722
- "Principal": {
723
- "Service": "lambda.amazonaws.com"
724
- }
725
- }
726
- ],
727
- "Version": "2012-10-17"
728
- },
729
- "Policies": [
730
- {
731
- "PolicyDocument": {
732
- "Statement": [
733
- {
734
- "Action": [
735
- "logs:CreateLogGroup",
736
- "logs:CreateLogStream",
737
- "logs:PutLogEvents"
738
- ],
739
- "Effect": "Allow",
740
- "Resource": {
741
- "Fn::Join": [
742
- "",
743
- [
744
- "arn:",
745
- {
746
- "Ref": "AWS::Partition"
747
- },
748
- ":logs:",
749
- {
750
- "Ref": "AWS::Region"
751
- },
752
- ":",
753
- {
754
- "Ref": "AWS::AccountId"
755
- },
756
- ":log-group:/aws/lambda/*"
757
- ]
758
- ]
759
- }
760
- }
761
- ],
762
- "Version": "2012-10-17"
763
- },
764
- "PolicyName": "LambdaFunctionServiceRolePolicy"
765
- }
766
- ]
767
- }
768
- },
769
- "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4": {
770
- "Type": "AWS::IAM::Policy",
771
- "Properties": {
772
- "PolicyDocument": {
773
- "Statement": [
774
- {
775
- "Action": [
776
- "ec2:CreateNetworkInterface",
777
- "ec2:DescribeNetworkInterfaces",
778
- "ec2:DeleteNetworkInterface",
779
- "ec2:AssignPrivateIpAddresses",
780
- "ec2:UnassignPrivateIpAddresses"
781
- ],
782
- "Effect": "Allow",
783
- "Resource": "*"
784
- },
785
- {
786
- "Action": [
787
- "xray:PutTraceSegments",
788
- "xray:PutTelemetryRecords"
789
- ],
790
- "Effect": "Allow",
791
- "Resource": "*"
792
- },
793
- {
794
- "Action": [
795
- "dynamodb:BatchGetItem",
796
- "dynamodb:GetRecords",
797
- "dynamodb:GetShardIterator",
798
- "dynamodb:Query",
799
- "dynamodb:GetItem",
800
- "dynamodb:Scan",
801
- "dynamodb:ConditionCheckItem",
802
- "dynamodb:BatchWriteItem",
803
- "dynamodb:PutItem",
804
- "dynamodb:UpdateItem",
805
- "dynamodb:DeleteItem",
806
- "dynamodb:DescribeTable"
807
- ],
808
- "Effect": "Allow",
809
- "Resource": [
810
- {
811
- "Fn::GetAtt": [
812
- "testlambdadynamodbstackDynamoTable8138E93B",
813
- "Arn"
814
- ]
815
- },
816
- {
817
- "Ref": "AWS::NoValue"
818
- }
819
- ]
820
- }
821
- ],
822
- "Version": "2012-10-17"
823
- },
824
- "PolicyName": "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4",
825
- "Roles": [
826
- {
827
- "Ref": "testlambdadynamodbstackLambdaFunctionServiceRole758347A1"
828
- }
829
- ]
830
- },
831
- "Metadata": {
832
- "cfn_nag": {
833
- "rules_to_suppress": [
834
- {
835
- "id": "W12",
836
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
837
- }
838
- ]
839
- }
840
- }
841
- },
842
- "testlambdadynamodbstackReplaceDefaultSecurityGroupsecuritygroup15025C82": {
843
- "Type": "AWS::EC2::SecurityGroup",
844
- "Properties": {
845
- "GroupDescription": "lamddb-deployFunctionWithExistingVpc/test-lambda-dynamodb-stack/ReplaceDefaultSecurityGroup-security-group",
846
- "SecurityGroupEgress": [
847
- {
848
- "CidrIp": "0.0.0.0/0",
849
- "Description": "Allow all outbound traffic by default",
850
- "IpProtocol": "-1"
851
- }
852
- ],
853
- "VpcId": {
854
- "Ref": "Vpc8378EB38"
855
- }
856
- },
857
- "Metadata": {
858
- "cfn_nag": {
859
- "rules_to_suppress": [
860
- {
861
- "id": "W5",
862
- "reason": "Egress of 0.0.0.0/0 is default and generally considered OK"
863
- },
864
- {
865
- "id": "W40",
866
- "reason": "Egress IPProtocol of -1 is default and generally considered OK"
867
- }
868
- ]
869
- }
870
- }
871
- },
872
- "testlambdadynamodbstackLambdaFunction5DDB3E8D": {
873
- "Type": "AWS::Lambda::Function",
874
- "Properties": {
875
- "Code": {
876
- "S3Bucket": {
877
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
878
- },
879
- "S3Key": "0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8.zip"
880
- },
881
- "Environment": {
882
- "Variables": {
883
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
884
- "DDB_TABLE_NAME": {
885
- "Ref": "testlambdadynamodbstackDynamoTable8138E93B"
886
- }
887
- }
888
- },
889
- "Handler": "index.handler",
890
- "Role": {
891
- "Fn::GetAtt": [
892
- "testlambdadynamodbstackLambdaFunctionServiceRole758347A1",
893
- "Arn"
894
- ]
895
- },
896
- "Runtime": "nodejs16.x",
897
- "TracingConfig": {
898
- "Mode": "Active"
899
- },
900
- "VpcConfig": {
901
- "SecurityGroupIds": [
902
- {
903
- "Fn::GetAtt": [
904
- "testlambdadynamodbstackReplaceDefaultSecurityGroupsecuritygroup15025C82",
905
- "GroupId"
906
- ]
907
- }
908
- ],
909
- "SubnetIds": [
910
- {
911
- "Ref": "VpcPrivateSubnet1Subnet536B997A"
912
- },
913
- {
914
- "Ref": "VpcPrivateSubnet2Subnet3788AAA1"
915
- },
916
- {
917
- "Ref": "VpcPrivateSubnet3SubnetF258B56E"
918
- }
919
- ]
920
- }
921
- },
922
- "DependsOn": [
923
- "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4",
924
- "testlambdadynamodbstackLambdaFunctionServiceRole758347A1",
925
- "VpcPrivateSubnet1DefaultRouteBE02A9ED",
926
- "VpcPrivateSubnet1RouteTableAssociation70C59FA6",
927
- "VpcPrivateSubnet2DefaultRoute060D2087",
928
- "VpcPrivateSubnet2RouteTableAssociationA89CAD56",
929
- "VpcPrivateSubnet3DefaultRoute94B74F0D",
930
- "VpcPrivateSubnet3RouteTableAssociation16BDDC43"
931
- ],
932
- "Metadata": {
933
- "cfn_nag": {
934
- "rules_to_suppress": [
935
- {
936
- "id": "W58",
937
- "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."
938
- },
939
- {
940
- "id": "W89",
941
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
942
- },
943
- {
944
- "id": "W92",
945
- "reason": "Impossible for us to define the correct concurrency for clients"
946
- }
947
- ]
948
- }
949
- }
950
- },
951
- "testlambdadynamodbstackDynamoTable8138E93B": {
952
- "Type": "AWS::DynamoDB::Table",
953
- "Properties": {
954
- "AttributeDefinitions": [
955
- {
956
- "AttributeName": "id",
957
- "AttributeType": "S"
958
- }
959
- ],
960
- "BillingMode": "PAY_PER_REQUEST",
961
- "KeySchema": [
962
- {
963
- "AttributeName": "id",
964
- "KeyType": "HASH"
965
- }
966
- ],
967
- "PointInTimeRecoverySpecification": {
968
- "PointInTimeRecoveryEnabled": true
969
- },
970
- "SSESpecification": {
971
- "SSEEnabled": true
972
- }
973
- },
974
- "UpdateReplacePolicy": "Retain",
975
- "DeletionPolicy": "Retain"
976
- }
977
- },
978
- "Parameters": {
979
- "BootstrapVersion": {
980
- "Type": "AWS::SSM::Parameter::Value<String>",
981
- "Default": "/cdk-bootstrap/hnb659fds/version",
982
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
983
- }
984
- },
985
- "Rules": {
986
- "CheckBootstrapVersion": {
987
- "Assertions": [
988
- {
989
- "Assert": {
990
- "Fn::Not": [
991
- {
992
- "Fn::Contains": [
993
- [
994
- "1",
995
- "2",
996
- "3",
997
- "4",
998
- "5"
999
- ],
1000
- {
1001
- "Ref": "BootstrapVersion"
1002
- }
1003
- ]
1004
- }
1005
- ]
1006
- },
1007
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
1008
- }
1009
- ]
1010
- }
1011
- }
1012
- }