@aws-solutions-constructs/aws-cloudfront-s3 2.59.0 → 2.61.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 (63) hide show
  1. package/.jsii +46 -9
  2. package/lib/index.js +1 -1
  3. package/package.json +8 -8
  4. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  5. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json +5 -5
  6. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json +134 -4
  7. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json +7 -1
  8. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json +91 -70
  9. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  10. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json +5 -5
  11. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json +119 -2
  12. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json +7 -1
  13. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json +49 -41
  14. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  15. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json +5 -5
  16. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json +134 -4
  17. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json +7 -1
  18. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json +89 -68
  19. package/test/integ.cfts3-custom-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  20. package/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json +5 -5
  21. package/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json +119 -2
  22. package/test/integ.cfts3-custom-headers.js.snapshot/manifest.json +7 -1
  23. package/test/integ.cfts3-custom-headers.js.snapshot/tree.json +53 -45
  24. package/test/integ.cfts3-custom-originPath.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  25. package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json +5 -5
  26. package/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json +119 -2
  27. package/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json +7 -1
  28. package/test/integ.cfts3-custom-originPath.js.snapshot/tree.json +51 -43
  29. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  30. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json +5 -5
  31. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json +119 -2
  32. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json +7 -1
  33. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json +51 -43
  34. package/test/integ.cfts3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  35. package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json +5 -5
  36. package/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json +119 -2
  37. package/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json +7 -1
  38. package/test/integ.cfts3-existing-bucket.js.snapshot/tree.json +55 -47
  39. package/test/integ.cfts3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  40. package/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json +5 -5
  41. package/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json +119 -2
  42. package/test/integ.cfts3-no-arguments.js.snapshot/manifest.json +7 -1
  43. package/test/integ.cfts3-no-arguments.js.snapshot/tree.json +51 -43
  44. package/test/integ.cfts3-no-logging.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  45. package/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json +5 -5
  46. package/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json +119 -2
  47. package/test/integ.cfts3-no-logging.js.snapshot/manifest.json +7 -1
  48. package/test/integ.cfts3-no-logging.js.snapshot/tree.json +33 -25
  49. package/test/integ.cfts3-no-security-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
  50. package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json +5 -5
  51. package/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json +119 -2
  52. package/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json +7 -1
  53. package/test/integ.cfts3-no-security-headers.js.snapshot/tree.json +49 -41
  54. package/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  55. package/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  56. package/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  57. package/test/integ.cfts3-custom-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  58. package/test/integ.cfts3-custom-originPath.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  59. package/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  60. package/test/integ.cfts3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  61. package/test/integ.cfts3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  62. package/test/integ.cfts3-no-logging.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
  63. package/test/integ.cfts3-no-security-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +0 -1
@@ -349,7 +349,7 @@
349
349
  "S3Bucket": {
350
350
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
351
351
  },
352
- "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip"
352
+ "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip"
353
353
  },
354
354
  "Timeout": 900,
355
355
  "MemorySize": 128,
@@ -360,7 +360,15 @@
360
360
  "Arn"
361
361
  ]
362
362
  },
363
- "Runtime": "nodejs18.x",
363
+ "Runtime": {
364
+ "Fn::FindInMap": [
365
+ "LatestNodeRuntimeMap",
366
+ {
367
+ "Ref": "AWS::Region"
368
+ },
369
+ "value"
370
+ ]
371
+ },
364
372
  "Description": {
365
373
  "Fn::Join": [
366
374
  "",
@@ -397,6 +405,115 @@
397
405
  }
398
406
  }
399
407
  },
408
+ "Mappings": {
409
+ "LatestNodeRuntimeMap": {
410
+ "af-south-1": {
411
+ "value": "nodejs20.x"
412
+ },
413
+ "ap-east-1": {
414
+ "value": "nodejs20.x"
415
+ },
416
+ "ap-northeast-1": {
417
+ "value": "nodejs20.x"
418
+ },
419
+ "ap-northeast-2": {
420
+ "value": "nodejs20.x"
421
+ },
422
+ "ap-northeast-3": {
423
+ "value": "nodejs20.x"
424
+ },
425
+ "ap-south-1": {
426
+ "value": "nodejs20.x"
427
+ },
428
+ "ap-south-2": {
429
+ "value": "nodejs20.x"
430
+ },
431
+ "ap-southeast-1": {
432
+ "value": "nodejs20.x"
433
+ },
434
+ "ap-southeast-2": {
435
+ "value": "nodejs20.x"
436
+ },
437
+ "ap-southeast-3": {
438
+ "value": "nodejs20.x"
439
+ },
440
+ "ap-southeast-4": {
441
+ "value": "nodejs20.x"
442
+ },
443
+ "ca-central-1": {
444
+ "value": "nodejs20.x"
445
+ },
446
+ "cn-north-1": {
447
+ "value": "nodejs18.x"
448
+ },
449
+ "cn-northwest-1": {
450
+ "value": "nodejs18.x"
451
+ },
452
+ "eu-central-1": {
453
+ "value": "nodejs20.x"
454
+ },
455
+ "eu-central-2": {
456
+ "value": "nodejs20.x"
457
+ },
458
+ "eu-north-1": {
459
+ "value": "nodejs20.x"
460
+ },
461
+ "eu-south-1": {
462
+ "value": "nodejs20.x"
463
+ },
464
+ "eu-south-2": {
465
+ "value": "nodejs20.x"
466
+ },
467
+ "eu-west-1": {
468
+ "value": "nodejs20.x"
469
+ },
470
+ "eu-west-2": {
471
+ "value": "nodejs20.x"
472
+ },
473
+ "eu-west-3": {
474
+ "value": "nodejs20.x"
475
+ },
476
+ "il-central-1": {
477
+ "value": "nodejs20.x"
478
+ },
479
+ "me-central-1": {
480
+ "value": "nodejs20.x"
481
+ },
482
+ "me-south-1": {
483
+ "value": "nodejs20.x"
484
+ },
485
+ "sa-east-1": {
486
+ "value": "nodejs20.x"
487
+ },
488
+ "us-east-1": {
489
+ "value": "nodejs20.x"
490
+ },
491
+ "us-east-2": {
492
+ "value": "nodejs20.x"
493
+ },
494
+ "us-gov-east-1": {
495
+ "value": "nodejs18.x"
496
+ },
497
+ "us-gov-west-1": {
498
+ "value": "nodejs18.x"
499
+ },
500
+ "us-iso-east-1": {
501
+ "value": "nodejs18.x"
502
+ },
503
+ "us-iso-west-1": {
504
+ "value": "nodejs18.x"
505
+ },
506
+ "us-isob-east-1": {
507
+ "value": "nodejs18.x"
508
+ },
509
+ "us-west-1": {
510
+ "value": "nodejs20.x"
511
+ },
512
+ "us-west-2": {
513
+ "value": "nodejs20.x"
514
+ }
515
+ }
516
+ },
400
517
  "Parameters": {
401
518
  "BootstrapVersion": {
402
519
  "Type": "AWS::SSM::Parameter::Value<String>",
@@ -66,7 +66,7 @@
66
66
  "validateOnSynth": false,
67
67
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
68
68
  "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
69
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c525710315524310fe48071370bc56910286d917d2220bd18ba5eb8289bea35.json",
69
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1b6403c9ed49e45f98967f4b122d393d13663756a40577955c38ab45ef221211.json",
70
70
  "requiresBootstrapStackVersion": 6,
71
71
  "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
72
72
  "additionalDependencies": [
@@ -118,6 +118,12 @@
118
118
  "data": "testcloudfronts3CloudFrontDistribution0565DEE8"
119
119
  }
120
120
  ],
121
+ "/cfts3-no-logging/LatestNodeRuntimeMap": [
122
+ {
123
+ "type": "aws:cdk:logicalId",
124
+ "data": "LatestNodeRuntimeMap"
125
+ }
126
+ ],
121
127
  "/cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [
122
128
  {
123
129
  "type": "aws:cdk:logicalId",
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "constructInfo": {
65
65
  "fqn": "aws-cdk-lib.aws_s3.CfnBucket",
66
- "version": "2.143.0"
66
+ "version": "2.147.3"
67
67
  }
68
68
  },
69
69
  "Policy": {
@@ -201,13 +201,13 @@
201
201
  },
202
202
  "constructInfo": {
203
203
  "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy",
204
- "version": "2.143.0"
204
+ "version": "2.147.3"
205
205
  }
206
206
  }
207
207
  },
208
208
  "constructInfo": {
209
209
  "fqn": "aws-cdk-lib.aws_s3.BucketPolicy",
210
- "version": "2.143.0"
210
+ "version": "2.147.3"
211
211
  }
212
212
  },
213
213
  "AutoDeleteObjectsCustomResource": {
@@ -219,19 +219,19 @@
219
219
  "path": "cfts3-no-logging/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default",
220
220
  "constructInfo": {
221
221
  "fqn": "aws-cdk-lib.CfnResource",
222
- "version": "2.143.0"
222
+ "version": "2.147.3"
223
223
  }
224
224
  }
225
225
  },
226
226
  "constructInfo": {
227
227
  "fqn": "aws-cdk-lib.CustomResource",
228
- "version": "2.143.0"
228
+ "version": "2.147.3"
229
229
  }
230
230
  }
231
231
  },
232
232
  "constructInfo": {
233
233
  "fqn": "aws-cdk-lib.aws_s3.Bucket",
234
- "version": "2.143.0"
234
+ "version": "2.147.3"
235
235
  }
236
236
  },
237
237
  "SetHttpSecurityHeaders": {
@@ -255,13 +255,13 @@
255
255
  },
256
256
  "constructInfo": {
257
257
  "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction",
258
- "version": "2.143.0"
258
+ "version": "2.147.3"
259
259
  }
260
260
  }
261
261
  },
262
262
  "constructInfo": {
263
263
  "fqn": "aws-cdk-lib.aws_cloudfront.Function",
264
- "version": "2.143.0"
264
+ "version": "2.147.3"
265
265
  }
266
266
  },
267
267
  "CloudFrontOac": {
@@ -301,7 +301,7 @@
301
301
  },
302
302
  "constructInfo": {
303
303
  "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl",
304
- "version": "2.143.0"
304
+ "version": "2.147.3"
305
305
  }
306
306
  },
307
307
  "CloudFrontDistribution": {
@@ -364,19 +364,27 @@
364
364
  },
365
365
  "constructInfo": {
366
366
  "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution",
367
- "version": "2.143.0"
367
+ "version": "2.147.3"
368
368
  }
369
369
  }
370
370
  },
371
371
  "constructInfo": {
372
372
  "fqn": "aws-cdk-lib.aws_cloudfront.Distribution",
373
- "version": "2.143.0"
373
+ "version": "2.147.3"
374
374
  }
375
375
  }
376
376
  },
377
377
  "constructInfo": {
378
378
  "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3",
379
- "version": "2.58.1"
379
+ "version": "2.60.0"
380
+ }
381
+ },
382
+ "LatestNodeRuntimeMap": {
383
+ "id": "LatestNodeRuntimeMap",
384
+ "path": "cfts3-no-logging/LatestNodeRuntimeMap",
385
+ "constructInfo": {
386
+ "fqn": "aws-cdk-lib.CfnMapping",
387
+ "version": "2.147.3"
380
388
  }
381
389
  },
382
390
  "Custom::S3AutoDeleteObjectsCustomResourceProvider": {
@@ -388,7 +396,7 @@
388
396
  "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging",
389
397
  "constructInfo": {
390
398
  "fqn": "aws-cdk-lib.AssetStaging",
391
- "version": "2.143.0"
399
+ "version": "2.147.3"
392
400
  }
393
401
  },
394
402
  "Role": {
@@ -396,7 +404,7 @@
396
404
  "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role",
397
405
  "constructInfo": {
398
406
  "fqn": "aws-cdk-lib.CfnResource",
399
- "version": "2.143.0"
407
+ "version": "2.147.3"
400
408
  }
401
409
  },
402
410
  "Handler": {
@@ -404,13 +412,13 @@
404
412
  "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler",
405
413
  "constructInfo": {
406
414
  "fqn": "aws-cdk-lib.CfnResource",
407
- "version": "2.143.0"
415
+ "version": "2.147.3"
408
416
  }
409
417
  }
410
418
  },
411
419
  "constructInfo": {
412
420
  "fqn": "aws-cdk-lib.CustomResourceProviderBase",
413
- "version": "2.143.0"
421
+ "version": "2.147.3"
414
422
  }
415
423
  },
416
424
  "Integ": {
@@ -438,7 +446,7 @@
438
446
  "path": "cfts3-no-logging/Integ/DefaultTest/DeployAssert/BootstrapVersion",
439
447
  "constructInfo": {
440
448
  "fqn": "aws-cdk-lib.CfnParameter",
441
- "version": "2.143.0"
449
+ "version": "2.147.3"
442
450
  }
443
451
  },
444
452
  "CheckBootstrapVersion": {
@@ -446,25 +454,25 @@
446
454
  "path": "cfts3-no-logging/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
447
455
  "constructInfo": {
448
456
  "fqn": "aws-cdk-lib.CfnRule",
449
- "version": "2.143.0"
457
+ "version": "2.147.3"
450
458
  }
451
459
  }
452
460
  },
453
461
  "constructInfo": {
454
462
  "fqn": "aws-cdk-lib.Stack",
455
- "version": "2.143.0"
463
+ "version": "2.147.3"
456
464
  }
457
465
  }
458
466
  },
459
467
  "constructInfo": {
460
468
  "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
461
- "version": "2.143.0-alpha.0"
469
+ "version": "2.147.3-alpha.0"
462
470
  }
463
471
  }
464
472
  },
465
473
  "constructInfo": {
466
474
  "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
467
- "version": "2.143.0-alpha.0"
475
+ "version": "2.147.3-alpha.0"
468
476
  }
469
477
  },
470
478
  "BootstrapVersion": {
@@ -472,7 +480,7 @@
472
480
  "path": "cfts3-no-logging/BootstrapVersion",
473
481
  "constructInfo": {
474
482
  "fqn": "aws-cdk-lib.CfnParameter",
475
- "version": "2.143.0"
483
+ "version": "2.147.3"
476
484
  }
477
485
  },
478
486
  "CheckBootstrapVersion": {
@@ -480,13 +488,13 @@
480
488
  "path": "cfts3-no-logging/CheckBootstrapVersion",
481
489
  "constructInfo": {
482
490
  "fqn": "aws-cdk-lib.CfnRule",
483
- "version": "2.143.0"
491
+ "version": "2.147.3"
484
492
  }
485
493
  }
486
494
  },
487
495
  "constructInfo": {
488
496
  "fqn": "aws-cdk-lib.Stack",
489
- "version": "2.143.0"
497
+ "version": "2.147.3"
490
498
  }
491
499
  },
492
500
  "Tree": {
@@ -500,7 +508,7 @@
500
508
  },
501
509
  "constructInfo": {
502
510
  "fqn": "aws-cdk-lib.App",
503
- "version": "2.143.0"
511
+ "version": "2.147.3"
504
512
  }
505
513
  }
506
514
  }
@@ -0,0 +1 @@
1
+ "use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")}
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "version": "36.0.0",
3
3
  "files": {
4
- "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": {
4
+ "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": {
5
5
  "source": {
6
- "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4",
6
+ "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6",
7
7
  "packaging": "zip"
8
8
  },
9
9
  "destinations": {
10
10
  "current_account-current_region": {
11
11
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
- "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip",
12
+ "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip",
13
13
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14
14
  }
15
15
  }
16
16
  },
17
- "b81bc785d75ef4ac4f26316462e91986864e3a787c96b3f51a61fce507f2d147": {
17
+ "d713968c3a9fada0edc53db4912991a93dc7fde082e5627e5c2d4bb3803adf56": {
18
18
  "source": {
19
19
  "path": "cfts3-no-security-headers.template.json",
20
20
  "packaging": "file"
@@ -22,7 +22,7 @@
22
22
  "destinations": {
23
23
  "current_account-current_region": {
24
24
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25
- "objectKey": "b81bc785d75ef4ac4f26316462e91986864e3a787c96b3f51a61fce507f2d147.json",
25
+ "objectKey": "d713968c3a9fada0edc53db4912991a93dc7fde082e5627e5c2d4bb3803adf56.json",
26
26
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27
27
  }
28
28
  }
@@ -834,7 +834,7 @@
834
834
  "S3Bucket": {
835
835
  "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
836
836
  },
837
- "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip"
837
+ "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip"
838
838
  },
839
839
  "Timeout": 900,
840
840
  "MemorySize": 128,
@@ -845,7 +845,15 @@
845
845
  "Arn"
846
846
  ]
847
847
  },
848
- "Runtime": "nodejs18.x",
848
+ "Runtime": {
849
+ "Fn::FindInMap": [
850
+ "LatestNodeRuntimeMap",
851
+ {
852
+ "Ref": "AWS::Region"
853
+ },
854
+ "value"
855
+ ]
856
+ },
849
857
  "Description": {
850
858
  "Fn::Join": [
851
859
  "",
@@ -882,6 +890,115 @@
882
890
  }
883
891
  }
884
892
  },
893
+ "Mappings": {
894
+ "LatestNodeRuntimeMap": {
895
+ "af-south-1": {
896
+ "value": "nodejs20.x"
897
+ },
898
+ "ap-east-1": {
899
+ "value": "nodejs20.x"
900
+ },
901
+ "ap-northeast-1": {
902
+ "value": "nodejs20.x"
903
+ },
904
+ "ap-northeast-2": {
905
+ "value": "nodejs20.x"
906
+ },
907
+ "ap-northeast-3": {
908
+ "value": "nodejs20.x"
909
+ },
910
+ "ap-south-1": {
911
+ "value": "nodejs20.x"
912
+ },
913
+ "ap-south-2": {
914
+ "value": "nodejs20.x"
915
+ },
916
+ "ap-southeast-1": {
917
+ "value": "nodejs20.x"
918
+ },
919
+ "ap-southeast-2": {
920
+ "value": "nodejs20.x"
921
+ },
922
+ "ap-southeast-3": {
923
+ "value": "nodejs20.x"
924
+ },
925
+ "ap-southeast-4": {
926
+ "value": "nodejs20.x"
927
+ },
928
+ "ca-central-1": {
929
+ "value": "nodejs20.x"
930
+ },
931
+ "cn-north-1": {
932
+ "value": "nodejs18.x"
933
+ },
934
+ "cn-northwest-1": {
935
+ "value": "nodejs18.x"
936
+ },
937
+ "eu-central-1": {
938
+ "value": "nodejs20.x"
939
+ },
940
+ "eu-central-2": {
941
+ "value": "nodejs20.x"
942
+ },
943
+ "eu-north-1": {
944
+ "value": "nodejs20.x"
945
+ },
946
+ "eu-south-1": {
947
+ "value": "nodejs20.x"
948
+ },
949
+ "eu-south-2": {
950
+ "value": "nodejs20.x"
951
+ },
952
+ "eu-west-1": {
953
+ "value": "nodejs20.x"
954
+ },
955
+ "eu-west-2": {
956
+ "value": "nodejs20.x"
957
+ },
958
+ "eu-west-3": {
959
+ "value": "nodejs20.x"
960
+ },
961
+ "il-central-1": {
962
+ "value": "nodejs20.x"
963
+ },
964
+ "me-central-1": {
965
+ "value": "nodejs20.x"
966
+ },
967
+ "me-south-1": {
968
+ "value": "nodejs20.x"
969
+ },
970
+ "sa-east-1": {
971
+ "value": "nodejs20.x"
972
+ },
973
+ "us-east-1": {
974
+ "value": "nodejs20.x"
975
+ },
976
+ "us-east-2": {
977
+ "value": "nodejs20.x"
978
+ },
979
+ "us-gov-east-1": {
980
+ "value": "nodejs18.x"
981
+ },
982
+ "us-gov-west-1": {
983
+ "value": "nodejs18.x"
984
+ },
985
+ "us-iso-east-1": {
986
+ "value": "nodejs18.x"
987
+ },
988
+ "us-iso-west-1": {
989
+ "value": "nodejs18.x"
990
+ },
991
+ "us-isob-east-1": {
992
+ "value": "nodejs18.x"
993
+ },
994
+ "us-west-1": {
995
+ "value": "nodejs20.x"
996
+ },
997
+ "us-west-2": {
998
+ "value": "nodejs20.x"
999
+ }
1000
+ }
1001
+ },
885
1002
  "Parameters": {
886
1003
  "BootstrapVersion": {
887
1004
  "Type": "AWS::SSM::Parameter::Value<String>",
@@ -66,7 +66,7 @@
66
66
  "validateOnSynth": false,
67
67
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
68
68
  "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
69
- "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b81bc785d75ef4ac4f26316462e91986864e3a787c96b3f51a61fce507f2d147.json",
69
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d713968c3a9fada0edc53db4912991a93dc7fde082e5627e5c2d4bb3803adf56.json",
70
70
  "requiresBootstrapStackVersion": 6,
71
71
  "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
72
72
  "additionalDependencies": [
@@ -166,6 +166,12 @@
166
166
  "data": "testcloudfronts3nosecurityheadersCloudFrontDistribution3BC8CDED"
167
167
  }
168
168
  ],
169
+ "/cfts3-no-security-headers/LatestNodeRuntimeMap": [
170
+ {
171
+ "type": "aws:cdk:logicalId",
172
+ "data": "LatestNodeRuntimeMap"
173
+ }
174
+ ],
169
175
  "/cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [
170
176
  {
171
177
  "type": "aws:cdk:logicalId",