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