@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,432 +0,0 @@
1
- {
2
- "Description": "Integration Test for Template Writer Resource",
3
- "Resources": {
4
- "TemplateWriterTemplateWriterLambdaRole8C61D206": {
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": "CloudWatchLogs"
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
- "/97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1.97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1"
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
- "TemplateWriterTemplateWriterLambdaRoleDefaultPolicy81F98029": {
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": "TemplateWriterTemplateWriterLambdaRoleDefaultPolicy81F98029",
133
- "Roles": [
134
- {
135
- "Ref": "TemplateWriterTemplateWriterLambdaRole8C61D206"
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
- "TemplateWriterTemplateWriterLambdaServiceRole24E2278A": {
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
- "TemplateWriterTemplateWriterLambda094E2FE3": {
206
- "Type": "AWS::Lambda::Function",
207
- "Properties": {
208
- "Code": {
209
- "S3Bucket": {
210
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
211
- },
212
- "S3Key": "547a4b3dc3398e50fa62f8292981f06976211ae2517fb8a4b0ad446205baf2e9.zip"
213
- },
214
- "Role": {
215
- "Fn::GetAtt": [
216
- "TemplateWriterTemplateWriterLambdaRole8C61D206",
217
- "Arn"
218
- ]
219
- },
220
- "FunctionName": "TemplateWriterTemplateWriterLambda",
221
- "Handler": "index.handler",
222
- "Runtime": "nodejs18.x",
223
- "TracingConfig": {
224
- "Mode": "Active"
225
- }
226
- },
227
- "DependsOn": [
228
- "TemplateWriterTemplateWriterLambdaRoleDefaultPolicy81F98029",
229
- "TemplateWriterTemplateWriterLambdaRole8C61D206"
230
- ],
231
- "Metadata": {
232
- "cfn_nag": {
233
- "rules_to_suppress": [
234
- {
235
- "id": "W58",
236
- "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."
237
- },
238
- {
239
- "id": "W89",
240
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
241
- },
242
- {
243
- "id": "W92",
244
- "reason": "Impossible for us to define the correct concurrency for clients"
245
- }
246
- ]
247
- }
248
- }
249
- },
250
- "TemplateWriterProviderframeworkonEventServiceRole14EC32AA": {
251
- "Type": "AWS::IAM::Role",
252
- "Properties": {
253
- "AssumeRolePolicyDocument": {
254
- "Statement": [
255
- {
256
- "Action": "sts:AssumeRole",
257
- "Effect": "Allow",
258
- "Principal": {
259
- "Service": "lambda.amazonaws.com"
260
- }
261
- }
262
- ],
263
- "Version": "2012-10-17"
264
- },
265
- "ManagedPolicyArns": [
266
- {
267
- "Fn::Join": [
268
- "",
269
- [
270
- "arn:",
271
- {
272
- "Ref": "AWS::Partition"
273
- },
274
- ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
275
- ]
276
- ]
277
- }
278
- ]
279
- }
280
- },
281
- "TemplateWriterProviderframeworkonEventServiceRoleDefaultPolicyA2203573": {
282
- "Type": "AWS::IAM::Policy",
283
- "Properties": {
284
- "PolicyDocument": {
285
- "Statement": [
286
- {
287
- "Action": "lambda:InvokeFunction",
288
- "Effect": "Allow",
289
- "Resource": [
290
- {
291
- "Fn::GetAtt": [
292
- "TemplateWriterTemplateWriterLambda094E2FE3",
293
- "Arn"
294
- ]
295
- },
296
- {
297
- "Fn::Join": [
298
- "",
299
- [
300
- {
301
- "Fn::GetAtt": [
302
- "TemplateWriterTemplateWriterLambda094E2FE3",
303
- "Arn"
304
- ]
305
- },
306
- ":*"
307
- ]
308
- ]
309
- }
310
- ]
311
- }
312
- ],
313
- "Version": "2012-10-17"
314
- },
315
- "PolicyName": "TemplateWriterProviderframeworkonEventServiceRoleDefaultPolicyA2203573",
316
- "Roles": [
317
- {
318
- "Ref": "TemplateWriterProviderframeworkonEventServiceRole14EC32AA"
319
- }
320
- ]
321
- }
322
- },
323
- "TemplateWriterProviderframeworkonEventD5CA1A9E": {
324
- "Type": "AWS::Lambda::Function",
325
- "Properties": {
326
- "Code": {
327
- "S3Bucket": {
328
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
329
- },
330
- "S3Key": "e8fea7e029780f03a78580d41b7ffbc4551d6e7d6caa190a451880191c166189.zip"
331
- },
332
- "Role": {
333
- "Fn::GetAtt": [
334
- "TemplateWriterProviderframeworkonEventServiceRole14EC32AA",
335
- "Arn"
336
- ]
337
- },
338
- "Description": "AWS CDK resource provider framework - onEvent (template-writer/TemplateWriterProvider)",
339
- "Environment": {
340
- "Variables": {
341
- "USER_ON_EVENT_FUNCTION_ARN": {
342
- "Fn::GetAtt": [
343
- "TemplateWriterTemplateWriterLambda094E2FE3",
344
- "Arn"
345
- ]
346
- }
347
- }
348
- },
349
- "Handler": "framework.onEvent",
350
- "Runtime": "nodejs14.x",
351
- "Timeout": 900
352
- },
353
- "DependsOn": [
354
- "TemplateWriterProviderframeworkonEventServiceRoleDefaultPolicyA2203573",
355
- "TemplateWriterProviderframeworkonEventServiceRole14EC32AA"
356
- ],
357
- "Metadata": {
358
- "cfn_nag": {
359
- "rules_to_suppress": [
360
- {
361
- "id": "W58",
362
- "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."
363
- },
364
- {
365
- "id": "W89",
366
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
367
- },
368
- {
369
- "id": "W92",
370
- "reason": "Impossible for us to define the correct concurrency for clients"
371
- }
372
- ]
373
- }
374
- }
375
- },
376
- "TemplateWriterTemplateWriterCustomResource": {
377
- "Type": "Custom::ApiTemplateWriter",
378
- "Properties": {
379
- "ServiceToken": {
380
- "Fn::GetAtt": [
381
- "TemplateWriterProviderframeworkonEventD5CA1A9E",
382
- "Arn"
383
- ]
384
- },
385
- "TemplateValues": "{\"templateValues\":[{\"id\":\"placeholder\",\"value\":\"resolved_value\"}]}",
386
- "TemplateInputBucket": {
387
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
388
- },
389
- "TemplateInputKey": "97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1.97cd237b0ae069fe0711bcc6a711e213fdaf0956421de5b964de9ccd0d2b23a1",
390
- "TemplateOutputBucket": {
391
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
392
- }
393
- },
394
- "UpdateReplacePolicy": "Delete",
395
- "DeletionPolicy": "Delete"
396
- }
397
- },
398
- "Parameters": {
399
- "BootstrapVersion": {
400
- "Type": "AWS::SSM::Parameter::Value<String>",
401
- "Default": "/cdk-bootstrap/hnb659fds/version",
402
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
403
- }
404
- },
405
- "Rules": {
406
- "CheckBootstrapVersion": {
407
- "Assertions": [
408
- {
409
- "Assert": {
410
- "Fn::Not": [
411
- {
412
- "Fn::Contains": [
413
- [
414
- "1",
415
- "2",
416
- "3",
417
- "4",
418
- "5"
419
- ],
420
- {
421
- "Ref": "BootstrapVersion"
422
- }
423
- ]
424
- }
425
- ]
426
- },
427
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
428
- }
429
- ]
430
- }
431
- }
432
- }