@aws-solutions-constructs/resources 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 (33) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +50 -5
  3. package/integ.config.json +7 -0
  4. package/package.json +11 -10
  5. package/test/integ.template-writer-from-asset.js +5 -2
  6. package/test/integ.template-writer-from-asset.js.snapshot/asset.7dbcd6245c5c6f70da313d31e9bd533af2214c565d855fb2f669666e927c125e +3 -0
  7. package/test/integ.template-writer-from-asset.js.snapshot/asset.97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1 +2 -0
  8. package/test/integ.template-writer-from-asset.js.snapshot/asset.b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7/index.d.ts +21 -0
  9. package/test/integ.template-writer-from-asset.js.snapshot/asset.b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7/index.js +65 -0
  10. package/test/integ.template-writer-from-asset.js.snapshot/cdk.out +1 -0
  11. package/test/integ.template-writer-from-asset.js.snapshot/integ.json +12 -0
  12. package/test/integ.template-writer-from-asset.js.snapshot/manifest.json +155 -0
  13. package/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json +71 -0
  14. package/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json +431 -0
  15. package/test/integ.template-writer-from-asset.js.snapshot/templatewriterfromassetIntegDefaultTestDeployAssert3AE00E9B.assets.json +19 -0
  16. package/test/integ.template-writer-from-asset.js.snapshot/templatewriterfromassetIntegDefaultTestDeployAssert3AE00E9B.template.json +36 -0
  17. package/test/integ.template-writer-from-asset.js.snapshot/tree.json +700 -0
  18. package/test/integ.template-writer-from-large-asset.js +5 -2
  19. package/test/integ.template-writer-from-large-asset.js.snapshot/asset.122da676fba68619def0d539ff80855eaa0ba3686fb37faa298ce277c4feb8f8 +25599 -0
  20. package/test/integ.template-writer-from-large-asset.js.snapshot/asset.7dbcd6245c5c6f70da313d31e9bd533af2214c565d855fb2f669666e927c125e +3 -0
  21. package/test/integ.template-writer-from-large-asset.js.snapshot/asset.b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7/index.d.ts +21 -0
  22. package/test/integ.template-writer-from-large-asset.js.snapshot/asset.b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7/index.js +65 -0
  23. package/test/integ.template-writer-from-large-asset.js.snapshot/cdk.out +1 -0
  24. package/test/integ.template-writer-from-large-asset.js.snapshot/integ.json +12 -0
  25. package/test/integ.template-writer-from-large-asset.js.snapshot/manifest.json +155 -0
  26. package/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.assets.json +71 -0
  27. package/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.template.json +433 -0
  28. package/test/integ.template-writer-from-large-asset.js.snapshot/templatewriterfromlargeassetIntegDefaultTestDeployAssertA02D2FEC.assets.json +19 -0
  29. package/test/integ.template-writer-from-large-asset.js.snapshot/templatewriterfromlargeassetIntegDefaultTestDeployAssertA02D2FEC.template.json +36 -0
  30. package/test/integ.template-writer-from-large-asset.js.snapshot/tree.json +702 -0
  31. package/test/integ.template-writer-from-asset.expected.json +0 -431
  32. package/test/integ.template-writer-from-large-asset.expected.json +0 -433
  33. package/test/integ.template-writer.expected.json +0 -432
@@ -1,433 +0,0 @@
1
- {
2
- "Description": "Integration Test for Template Writer Resource",
3
- "Resources": {
4
- "TestTemplateWriterLambdaRole192FE23A": {
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
- "Description": "Role used by the TemplateWriterLambda to transform the incoming asset",
20
- "Policies": [
21
- {
22
- "PolicyDocument": {
23
- "Statement": [
24
- {
25
- "Action": [
26
- "logs:CreateLogGroup",
27
- "logs:CreateLogStream",
28
- "logs:PutLogEvents"
29
- ],
30
- "Effect": "Allow",
31
- "Resource": {
32
- "Fn::Join": [
33
- "",
34
- [
35
- "arn:",
36
- {
37
- "Ref": "AWS::Partition"
38
- },
39
- ":logs:",
40
- {
41
- "Ref": "AWS::Region"
42
- },
43
- ":",
44
- {
45
- "Ref": "AWS::AccountId"
46
- },
47
- ":log-group:/aws/lambda/*"
48
- ]
49
- ]
50
- }
51
- }
52
- ],
53
- "Version": "2012-10-17"
54
- },
55
- "PolicyName": "CloudWatchLogsPolicy"
56
- },
57
- {
58
- "PolicyDocument": {
59
- "Statement": [
60
- {
61
- "Action": "s3:GetObject",
62
- "Effect": "Allow",
63
- "Resource": {
64
- "Fn::Join": [
65
- "",
66
- [
67
- "arn:",
68
- {
69
- "Ref": "AWS::Partition"
70
- },
71
- ":s3:::",
72
- {
73
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
74
- },
75
- "/122da676fba68619def0d539ff80855eaa0ba3686fb37faa298ce277c4feb8f8.122da676fba68619def0d539ff80855eaa0ba3686fb37faa298ce277c4feb8f8"
76
- ]
77
- ]
78
- }
79
- }
80
- ],
81
- "Version": "2012-10-17"
82
- },
83
- "PolicyName": "ReadInputAssetPolicy"
84
- },
85
- {
86
- "PolicyDocument": {
87
- "Statement": [
88
- {
89
- "Action": "s3:PutObject",
90
- "Effect": "Allow",
91
- "Resource": {
92
- "Fn::Join": [
93
- "",
94
- [
95
- "arn:",
96
- {
97
- "Ref": "AWS::Partition"
98
- },
99
- ":s3:::",
100
- {
101
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
102
- },
103
- "/*"
104
- ]
105
- ]
106
- }
107
- }
108
- ],
109
- "Version": "2012-10-17"
110
- },
111
- "PolicyName": "WriteOutputAssetPolicy"
112
- }
113
- ]
114
- }
115
- },
116
- "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC": {
117
- "Type": "AWS::IAM::Policy",
118
- "Properties": {
119
- "PolicyDocument": {
120
- "Statement": [
121
- {
122
- "Action": [
123
- "xray:PutTraceSegments",
124
- "xray:PutTelemetryRecords"
125
- ],
126
- "Effect": "Allow",
127
- "Resource": "*"
128
- }
129
- ],
130
- "Version": "2012-10-17"
131
- },
132
- "PolicyName": "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC",
133
- "Roles": [
134
- {
135
- "Ref": "TestTemplateWriterLambdaRole192FE23A"
136
- }
137
- ]
138
- },
139
- "Metadata": {
140
- "cfn_nag": {
141
- "rules_to_suppress": [
142
- {
143
- "id": "W12",
144
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
145
- }
146
- ]
147
- }
148
- }
149
- },
150
- "LambdaFunctionServiceRole0C4CDE0B": {
151
- "Type": "AWS::IAM::Role",
152
- "Properties": {
153
- "AssumeRolePolicyDocument": {
154
- "Statement": [
155
- {
156
- "Action": "sts:AssumeRole",
157
- "Effect": "Allow",
158
- "Principal": {
159
- "Service": "lambda.amazonaws.com"
160
- }
161
- }
162
- ],
163
- "Version": "2012-10-17"
164
- },
165
- "Policies": [
166
- {
167
- "PolicyDocument": {
168
- "Statement": [
169
- {
170
- "Action": [
171
- "logs:CreateLogGroup",
172
- "logs:CreateLogStream",
173
- "logs:PutLogEvents"
174
- ],
175
- "Effect": "Allow",
176
- "Resource": {
177
- "Fn::Join": [
178
- "",
179
- [
180
- "arn:",
181
- {
182
- "Ref": "AWS::Partition"
183
- },
184
- ":logs:",
185
- {
186
- "Ref": "AWS::Region"
187
- },
188
- ":",
189
- {
190
- "Ref": "AWS::AccountId"
191
- },
192
- ":log-group:/aws/lambda/*"
193
- ]
194
- ]
195
- }
196
- }
197
- ],
198
- "Version": "2012-10-17"
199
- },
200
- "PolicyName": "LambdaFunctionServiceRolePolicy"
201
- }
202
- ]
203
- }
204
- },
205
- "LambdaFunctionBF21E41F": {
206
- "Type": "AWS::Lambda::Function",
207
- "Properties": {
208
- "Code": {
209
- "S3Bucket": {
210
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
211
- },
212
- "S3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip"
213
- },
214
- "Handler": "index.handler",
215
- "MemorySize": 1024,
216
- "Role": {
217
- "Fn::GetAtt": [
218
- "TestTemplateWriterLambdaRole192FE23A",
219
- "Arn"
220
- ]
221
- },
222
- "Runtime": "nodejs18.x",
223
- "Timeout": 60,
224
- "TracingConfig": {
225
- "Mode": "Active"
226
- }
227
- },
228
- "DependsOn": [
229
- "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC",
230
- "TestTemplateWriterLambdaRole192FE23A"
231
- ],
232
- "Metadata": {
233
- "cfn_nag": {
234
- "rules_to_suppress": [
235
- {
236
- "id": "W58",
237
- "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."
238
- },
239
- {
240
- "id": "W89",
241
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
242
- },
243
- {
244
- "id": "W92",
245
- "reason": "Impossible for us to define the correct concurrency for clients"
246
- }
247
- ]
248
- }
249
- }
250
- },
251
- "TestTemplateWriterProviderframeworkonEventServiceRoleED11CF9A": {
252
- "Type": "AWS::IAM::Role",
253
- "Properties": {
254
- "AssumeRolePolicyDocument": {
255
- "Statement": [
256
- {
257
- "Action": "sts:AssumeRole",
258
- "Effect": "Allow",
259
- "Principal": {
260
- "Service": "lambda.amazonaws.com"
261
- }
262
- }
263
- ],
264
- "Version": "2012-10-17"
265
- },
266
- "ManagedPolicyArns": [
267
- {
268
- "Fn::Join": [
269
- "",
270
- [
271
- "arn:",
272
- {
273
- "Ref": "AWS::Partition"
274
- },
275
- ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
276
- ]
277
- ]
278
- }
279
- ]
280
- }
281
- },
282
- "TestTemplateWriterProviderframeworkonEventServiceRoleDefaultPolicy08B90D53": {
283
- "Type": "AWS::IAM::Policy",
284
- "Properties": {
285
- "PolicyDocument": {
286
- "Statement": [
287
- {
288
- "Action": "lambda:InvokeFunction",
289
- "Effect": "Allow",
290
- "Resource": [
291
- {
292
- "Fn::GetAtt": [
293
- "LambdaFunctionBF21E41F",
294
- "Arn"
295
- ]
296
- },
297
- {
298
- "Fn::Join": [
299
- "",
300
- [
301
- {
302
- "Fn::GetAtt": [
303
- "LambdaFunctionBF21E41F",
304
- "Arn"
305
- ]
306
- },
307
- ":*"
308
- ]
309
- ]
310
- }
311
- ]
312
- }
313
- ],
314
- "Version": "2012-10-17"
315
- },
316
- "PolicyName": "TestTemplateWriterProviderframeworkonEventServiceRoleDefaultPolicy08B90D53",
317
- "Roles": [
318
- {
319
- "Ref": "TestTemplateWriterProviderframeworkonEventServiceRoleED11CF9A"
320
- }
321
- ]
322
- }
323
- },
324
- "TestTemplateWriterProviderframeworkonEvent7FDD3553": {
325
- "Type": "AWS::Lambda::Function",
326
- "Properties": {
327
- "Code": {
328
- "S3Bucket": {
329
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
330
- },
331
- "S3Key": "7382a0addb9f34974a1ea6c6c9b063882af874828f366f5c93b2b7b64db15c94.zip"
332
- },
333
- "Description": "AWS CDK resource provider framework - onEvent (template-writer-from-large-asset/TestTemplateWriterProvider)",
334
- "Environment": {
335
- "Variables": {
336
- "USER_ON_EVENT_FUNCTION_ARN": {
337
- "Fn::GetAtt": [
338
- "LambdaFunctionBF21E41F",
339
- "Arn"
340
- ]
341
- }
342
- }
343
- },
344
- "Handler": "framework.onEvent",
345
- "Role": {
346
- "Fn::GetAtt": [
347
- "TestTemplateWriterProviderframeworkonEventServiceRoleED11CF9A",
348
- "Arn"
349
- ]
350
- },
351
- "Runtime": "nodejs18.x",
352
- "Timeout": 900
353
- },
354
- "DependsOn": [
355
- "TestTemplateWriterProviderframeworkonEventServiceRoleDefaultPolicy08B90D53",
356
- "TestTemplateWriterProviderframeworkonEventServiceRoleED11CF9A"
357
- ],
358
- "Metadata": {
359
- "cfn_nag": {
360
- "rules_to_suppress": [
361
- {
362
- "id": "W58",
363
- "reason": "The CDK-provided lambda function that backs their Custom Resource Provider framework has an IAM role with the arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole Managed Policy attached, which grants permission to write to CloudWatch Logs"
364
- },
365
- {
366
- "id": "W89",
367
- "reason": "The CDK-provided lambda function that backs their Custom Resource Provider framework does not access VPC resources"
368
- },
369
- {
370
- "id": "W92",
371
- "reason": "The CDK-provided lambda function that backs their Custom Resource Provider framework does not define ReservedConcurrentExecutions"
372
- }
373
- ]
374
- }
375
- }
376
- },
377
- "TestTemplateWriterCustomResource": {
378
- "Type": "Custom::TemplateWriter",
379
- "Properties": {
380
- "ServiceToken": {
381
- "Fn::GetAtt": [
382
- "TestTemplateWriterProviderframeworkonEvent7FDD3553",
383
- "Arn"
384
- ]
385
- },
386
- "TemplateValues": "{\"templateValues\":[{\"id\":\"Lorem\",\"value\":\"LOREM_2\"},{\"id\":\"Velit\",\"value\":\"VELIT_2\"},{\"id\":\"Ornare\",\"value\":\"ORNARE_2\"},{\"id\":\"Ullamcorper\",\"value\":\"ULLAMCORPER_2\"},{\"id\":\"Blandit\",\"value\":\"BLANDIT_2\"},{\"id\":\"Bibendum\",\"value\":\"BIBENDUM_2\"}]}",
387
- "TemplateInputBucket": {
388
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
389
- },
390
- "TemplateInputKey": "122da676fba68619def0d539ff80855eaa0ba3686fb37faa298ce277c4feb8f8.122da676fba68619def0d539ff80855eaa0ba3686fb37faa298ce277c4feb8f8",
391
- "TemplateOutputBucket": {
392
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
393
- }
394
- },
395
- "UpdateReplacePolicy": "Delete",
396
- "DeletionPolicy": "Delete"
397
- }
398
- },
399
- "Parameters": {
400
- "BootstrapVersion": {
401
- "Type": "AWS::SSM::Parameter::Value<String>",
402
- "Default": "/cdk-bootstrap/hnb659fds/version",
403
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
404
- }
405
- },
406
- "Rules": {
407
- "CheckBootstrapVersion": {
408
- "Assertions": [
409
- {
410
- "Assert": {
411
- "Fn::Not": [
412
- {
413
- "Fn::Contains": [
414
- [
415
- "1",
416
- "2",
417
- "3",
418
- "4",
419
- "5"
420
- ],
421
- {
422
- "Ref": "BootstrapVersion"
423
- }
424
- ]
425
- }
426
- ]
427
- },
428
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
429
- }
430
- ]
431
- }
432
- }
433
- }