@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
@@ -1,231 +0,0 @@
1
- {
2
- "Resources": {
3
- "teststream04374A09": {
4
- "Type": "AWS::Kinesis::Stream",
5
- "Properties": {
6
- "RetentionPeriodHours": 24,
7
- "StreamEncryption": {
8
- "EncryptionType": "KMS",
9
- "KeyId": "alias/aws/kinesis"
10
- },
11
- "StreamModeDetails": {
12
- "StreamMode": "ON_DEMAND"
13
- }
14
- }
15
- },
16
- "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3": {
17
- "Type": "AWS::IAM::Role",
18
- "Properties": {
19
- "AssumeRolePolicyDocument": {
20
- "Statement": [
21
- {
22
- "Action": "sts:AssumeRole",
23
- "Effect": "Allow",
24
- "Principal": {
25
- "Service": "lambda.amazonaws.com"
26
- }
27
- }
28
- ],
29
- "Version": "2012-10-17"
30
- },
31
- "Policies": [
32
- {
33
- "PolicyDocument": {
34
- "Statement": [
35
- {
36
- "Action": [
37
- "logs:CreateLogGroup",
38
- "logs:CreateLogStream",
39
- "logs:PutLogEvents"
40
- ],
41
- "Effect": "Allow",
42
- "Resource": {
43
- "Fn::Join": [
44
- "",
45
- [
46
- "arn:",
47
- {
48
- "Ref": "AWS::Partition"
49
- },
50
- ":logs:",
51
- {
52
- "Ref": "AWS::Region"
53
- },
54
- ":",
55
- {
56
- "Ref": "AWS::AccountId"
57
- },
58
- ":log-group:/aws/lambda/*"
59
- ]
60
- ]
61
- }
62
- }
63
- ],
64
- "Version": "2012-10-17"
65
- },
66
- "PolicyName": "LambdaFunctionServiceRolePolicy"
67
- }
68
- ]
69
- }
70
- },
71
- "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043": {
72
- "Type": "AWS::IAM::Policy",
73
- "Properties": {
74
- "PolicyDocument": {
75
- "Statement": [
76
- {
77
- "Action": [
78
- "xray:PutTraceSegments",
79
- "xray:PutTelemetryRecords"
80
- ],
81
- "Effect": "Allow",
82
- "Resource": "*"
83
- },
84
- {
85
- "Action": [
86
- "kinesis:ListShards",
87
- "kinesis:PutRecord",
88
- "kinesis:PutRecords"
89
- ],
90
- "Effect": "Allow",
91
- "Resource": {
92
- "Fn::GetAtt": [
93
- "teststream04374A09",
94
- "Arn"
95
- ]
96
- }
97
- }
98
- ],
99
- "Version": "2012-10-17"
100
- },
101
- "PolicyName": "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043",
102
- "Roles": [
103
- {
104
- "Ref": "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
105
- }
106
- ]
107
- },
108
- "Metadata": {
109
- "cfn_nag": {
110
- "rules_to_suppress": [
111
- {
112
- "id": "W12",
113
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
114
- }
115
- ]
116
- }
117
- }
118
- },
119
- "testlambdakinesisstreamsLambdaFunction4348B6E4": {
120
- "Type": "AWS::Lambda::Function",
121
- "Properties": {
122
- "Code": {
123
- "S3Bucket": {
124
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
125
- },
126
- "S3Key": "c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf.zip"
127
- },
128
- "Environment": {
129
- "Variables": {
130
- "KINESIS_DATASTREAM_NAME": {
131
- "Ref": "teststream04374A09"
132
- }
133
- }
134
- },
135
- "Handler": "index.handler",
136
- "Role": {
137
- "Fn::GetAtt": [
138
- "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3",
139
- "Arn"
140
- ]
141
- },
142
- "Runtime": "nodejs18.x",
143
- "TracingConfig": {
144
- "Mode": "Active"
145
- }
146
- },
147
- "DependsOn": [
148
- "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043",
149
- "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
150
- ],
151
- "Metadata": {
152
- "cfn_nag": {
153
- "rules_to_suppress": [
154
- {
155
- "id": "W58",
156
- "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."
157
- },
158
- {
159
- "id": "W89",
160
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
161
- },
162
- {
163
- "id": "W92",
164
- "reason": "Impossible for us to define the correct concurrency for clients"
165
- }
166
- ]
167
- }
168
- }
169
- },
170
- "testlambdakinesisstreamsKinesisStreamGetRecordsIteratorAgeAlarmC4A0FF00": {
171
- "Type": "AWS::CloudWatch::Alarm",
172
- "Properties": {
173
- "AlarmDescription": "Consumer Record Processing Falling Behind, there is risk for data loss due to record expiration.",
174
- "ComparisonOperator": "GreaterThanOrEqualToThreshold",
175
- "EvaluationPeriods": 1,
176
- "MetricName": "GetRecords.IteratorAgeMilliseconds",
177
- "Namespace": "AWS/Kinesis",
178
- "Period": 300,
179
- "Statistic": "Maximum",
180
- "Threshold": 43200000
181
- }
182
- },
183
- "testlambdakinesisstreamsKinesisStreamReadProvisionedThroughputExceededAlarm9732E188": {
184
- "Type": "AWS::CloudWatch::Alarm",
185
- "Properties": {
186
- "AlarmDescription": "Consumer Application is Reading at a Slower Rate Than Expected.",
187
- "ComparisonOperator": "GreaterThanThreshold",
188
- "EvaluationPeriods": 1,
189
- "MetricName": "ReadProvisionedThroughputExceeded",
190
- "Namespace": "AWS/Kinesis",
191
- "Period": 300,
192
- "Statistic": "Average",
193
- "Threshold": 0
194
- }
195
- }
196
- },
197
- "Parameters": {
198
- "BootstrapVersion": {
199
- "Type": "AWS::SSM::Parameter::Value<String>",
200
- "Default": "/cdk-bootstrap/hnb659fds/version",
201
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
202
- }
203
- },
204
- "Rules": {
205
- "CheckBootstrapVersion": {
206
- "Assertions": [
207
- {
208
- "Assert": {
209
- "Fn::Not": [
210
- {
211
- "Fn::Contains": [
212
- [
213
- "1",
214
- "2",
215
- "3",
216
- "4",
217
- "5"
218
- ],
219
- {
220
- "Ref": "BootstrapVersion"
221
- }
222
- ]
223
- }
224
- ]
225
- },
226
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
227
- }
228
- ]
229
- }
230
- }
231
- }
@@ -1,297 +0,0 @@
1
- {
2
- "Resources": {
3
- "testkey784D0285": {
4
- "Type": "AWS::KMS::Key",
5
- "Properties": {
6
- "EnableKeyRotation": true,
7
- "KeyPolicy": {
8
- "Statement": [
9
- {
10
- "Action": "kms:*",
11
- "Effect": "Allow",
12
- "Principal": {
13
- "AWS": {
14
- "Fn::Join": [
15
- "",
16
- [
17
- "arn:",
18
- {
19
- "Ref": "AWS::Partition"
20
- },
21
- ":iam::",
22
- {
23
- "Ref": "AWS::AccountId"
24
- },
25
- ":root"
26
- ]
27
- ]
28
- }
29
- },
30
- "Resource": "*"
31
- }
32
- ],
33
- "Version": "2012-10-17"
34
- }
35
- },
36
- "UpdateReplacePolicy": "Retain",
37
- "DeletionPolicy": "Retain"
38
- },
39
- "teststream04374A09": {
40
- "Type": "AWS::Kinesis::Stream",
41
- "Properties": {
42
- "RetentionPeriodHours": 24,
43
- "ShardCount": 1,
44
- "StreamEncryption": {
45
- "EncryptionType": "KMS",
46
- "KeyId": {
47
- "Fn::GetAtt": [
48
- "testkey784D0285",
49
- "Arn"
50
- ]
51
- }
52
- }
53
- }
54
- },
55
- "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3": {
56
- "Type": "AWS::IAM::Role",
57
- "Properties": {
58
- "AssumeRolePolicyDocument": {
59
- "Statement": [
60
- {
61
- "Action": "sts:AssumeRole",
62
- "Effect": "Allow",
63
- "Principal": {
64
- "Service": "lambda.amazonaws.com"
65
- }
66
- }
67
- ],
68
- "Version": "2012-10-17"
69
- },
70
- "Policies": [
71
- {
72
- "PolicyDocument": {
73
- "Statement": [
74
- {
75
- "Action": [
76
- "logs:CreateLogGroup",
77
- "logs:CreateLogStream",
78
- "logs:PutLogEvents"
79
- ],
80
- "Effect": "Allow",
81
- "Resource": {
82
- "Fn::Join": [
83
- "",
84
- [
85
- "arn:",
86
- {
87
- "Ref": "AWS::Partition"
88
- },
89
- ":logs:",
90
- {
91
- "Ref": "AWS::Region"
92
- },
93
- ":",
94
- {
95
- "Ref": "AWS::AccountId"
96
- },
97
- ":log-group:/aws/lambda/*"
98
- ]
99
- ]
100
- }
101
- }
102
- ],
103
- "Version": "2012-10-17"
104
- },
105
- "PolicyName": "LambdaFunctionServiceRolePolicy"
106
- }
107
- ]
108
- }
109
- },
110
- "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043": {
111
- "Type": "AWS::IAM::Policy",
112
- "Properties": {
113
- "PolicyDocument": {
114
- "Statement": [
115
- {
116
- "Action": [
117
- "xray:PutTraceSegments",
118
- "xray:PutTelemetryRecords"
119
- ],
120
- "Effect": "Allow",
121
- "Resource": "*"
122
- },
123
- {
124
- "Action": [
125
- "kinesis:ListShards",
126
- "kinesis:PutRecord",
127
- "kinesis:PutRecords"
128
- ],
129
- "Effect": "Allow",
130
- "Resource": {
131
- "Fn::GetAtt": [
132
- "teststream04374A09",
133
- "Arn"
134
- ]
135
- }
136
- },
137
- {
138
- "Action": [
139
- "kms:Encrypt",
140
- "kms:ReEncrypt*",
141
- "kms:GenerateDataKey*"
142
- ],
143
- "Effect": "Allow",
144
- "Resource": {
145
- "Fn::GetAtt": [
146
- "testkey784D0285",
147
- "Arn"
148
- ]
149
- }
150
- },
151
- {
152
- "Action": [
153
- "kms:Decrypt",
154
- "kms:GenerateDataKey*"
155
- ],
156
- "Effect": "Allow",
157
- "Resource": {
158
- "Fn::GetAtt": [
159
- "testkey784D0285",
160
- "Arn"
161
- ]
162
- }
163
- }
164
- ],
165
- "Version": "2012-10-17"
166
- },
167
- "PolicyName": "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043",
168
- "Roles": [
169
- {
170
- "Ref": "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
171
- }
172
- ]
173
- },
174
- "Metadata": {
175
- "cfn_nag": {
176
- "rules_to_suppress": [
177
- {
178
- "id": "W12",
179
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
180
- }
181
- ]
182
- }
183
- }
184
- },
185
- "testlambdakinesisstreamsLambdaFunction4348B6E4": {
186
- "Type": "AWS::Lambda::Function",
187
- "Properties": {
188
- "Code": {
189
- "S3Bucket": {
190
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
191
- },
192
- "S3Key": "c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf.zip"
193
- },
194
- "Environment": {
195
- "Variables": {
196
- "KINESIS_DATASTREAM_NAME": {
197
- "Ref": "teststream04374A09"
198
- }
199
- }
200
- },
201
- "Handler": "index.handler",
202
- "Role": {
203
- "Fn::GetAtt": [
204
- "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3",
205
- "Arn"
206
- ]
207
- },
208
- "Runtime": "nodejs18.x",
209
- "TracingConfig": {
210
- "Mode": "Active"
211
- }
212
- },
213
- "DependsOn": [
214
- "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043",
215
- "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
216
- ],
217
- "Metadata": {
218
- "cfn_nag": {
219
- "rules_to_suppress": [
220
- {
221
- "id": "W58",
222
- "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."
223
- },
224
- {
225
- "id": "W89",
226
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
227
- },
228
- {
229
- "id": "W92",
230
- "reason": "Impossible for us to define the correct concurrency for clients"
231
- }
232
- ]
233
- }
234
- }
235
- },
236
- "testlambdakinesisstreamsKinesisStreamGetRecordsIteratorAgeAlarmC4A0FF00": {
237
- "Type": "AWS::CloudWatch::Alarm",
238
- "Properties": {
239
- "AlarmDescription": "Consumer Record Processing Falling Behind, there is risk for data loss due to record expiration.",
240
- "ComparisonOperator": "GreaterThanOrEqualToThreshold",
241
- "EvaluationPeriods": 1,
242
- "MetricName": "GetRecords.IteratorAgeMilliseconds",
243
- "Namespace": "AWS/Kinesis",
244
- "Period": 300,
245
- "Statistic": "Maximum",
246
- "Threshold": 43200000
247
- }
248
- },
249
- "testlambdakinesisstreamsKinesisStreamReadProvisionedThroughputExceededAlarm9732E188": {
250
- "Type": "AWS::CloudWatch::Alarm",
251
- "Properties": {
252
- "AlarmDescription": "Consumer Application is Reading at a Slower Rate Than Expected.",
253
- "ComparisonOperator": "GreaterThanThreshold",
254
- "EvaluationPeriods": 1,
255
- "MetricName": "ReadProvisionedThroughputExceeded",
256
- "Namespace": "AWS/Kinesis",
257
- "Period": 300,
258
- "Statistic": "Average",
259
- "Threshold": 0
260
- }
261
- }
262
- },
263
- "Parameters": {
264
- "BootstrapVersion": {
265
- "Type": "AWS::SSM::Parameter::Value<String>",
266
- "Default": "/cdk-bootstrap/hnb659fds/version",
267
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
268
- }
269
- },
270
- "Rules": {
271
- "CheckBootstrapVersion": {
272
- "Assertions": [
273
- {
274
- "Assert": {
275
- "Fn::Not": [
276
- {
277
- "Fn::Contains": [
278
- [
279
- "1",
280
- "2",
281
- "3",
282
- "4",
283
- "5"
284
- ],
285
- {
286
- "Ref": "BootstrapVersion"
287
- }
288
- ]
289
- }
290
- ]
291
- },
292
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
293
- }
294
- ]
295
- }
296
- }
297
- }