@aws-solutions-constructs/aws-kinesisfirehose-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.
- package/.jsii +45 -8
- package/lib/index.js +1 -1
- package/package.json +6 -6
- package/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
- package/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.assets.json +5 -5
- package/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.template.json +119 -2
- package/test/integ.fhss3-customLoggingBucket.js.snapshot/manifest.json +7 -1
- package/test/integ.fhss3-customLoggingBucket.js.snapshot/tree.json +45 -37
- package/test/integ.fhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
- package/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.assets.json +5 -5
- package/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.template.json +119 -2
- package/test/integ.fhss3-no-arguments.js.snapshot/manifest.json +7 -1
- package/test/integ.fhss3-no-arguments.js.snapshot/tree.json +47 -39
- package/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
- package/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.assets.json +5 -5
- package/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.template.json +119 -2
- package/test/integ.fhss3-pre-existing-bucket.js.snapshot/manifest.json +7 -1
- package/test/integ.fhss3-pre-existing-bucket.js.snapshot/tree.json +48 -40
- package/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
- package/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.assets.json +5 -5
- package/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.template.json +119 -2
- package/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/manifest.json +7 -1
- package/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/tree.json +53 -45
- package/test/integ.fhss3-two-instances.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
- package/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.assets.json +5 -5
- package/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.template.json +119 -2
- package/test/integ.fhss3-two-instances.js.snapshot/manifest.json +7 -1
- package/test/integ.fhss3-two-instances.js.snapshot/tree.json +71 -63
- package/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.fhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
- package/test/integ.fhss3-two-instances.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +0 -1
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"constructInfo": {
|
|
52
52
|
"fqn": "aws-cdk-lib.aws_s3.CfnBucket",
|
|
53
|
-
"version": "2.
|
|
53
|
+
"version": "2.147.3"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"Policy": {
|
|
@@ -184,13 +184,13 @@
|
|
|
184
184
|
},
|
|
185
185
|
"constructInfo": {
|
|
186
186
|
"fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy",
|
|
187
|
-
"version": "2.
|
|
187
|
+
"version": "2.147.3"
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
191
|
"constructInfo": {
|
|
192
192
|
"fqn": "aws-cdk-lib.aws_s3.BucketPolicy",
|
|
193
|
-
"version": "2.
|
|
193
|
+
"version": "2.147.3"
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
196
|
"AutoDeleteObjectsCustomResource": {
|
|
@@ -202,19 +202,19 @@
|
|
|
202
202
|
"path": "fhss3-no-arguments/test-firehose-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default",
|
|
203
203
|
"constructInfo": {
|
|
204
204
|
"fqn": "aws-cdk-lib.CfnResource",
|
|
205
|
-
"version": "2.
|
|
205
|
+
"version": "2.147.3"
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
209
|
"constructInfo": {
|
|
210
210
|
"fqn": "aws-cdk-lib.CustomResource",
|
|
211
|
-
"version": "2.
|
|
211
|
+
"version": "2.147.3"
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
"constructInfo": {
|
|
216
216
|
"fqn": "aws-cdk-lib.aws_s3.Bucket",
|
|
217
|
-
"version": "2.
|
|
217
|
+
"version": "2.147.3"
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
220
|
"S3Bucket": {
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
},
|
|
274
274
|
"constructInfo": {
|
|
275
275
|
"fqn": "aws-cdk-lib.aws_s3.CfnBucket",
|
|
276
|
-
"version": "2.
|
|
276
|
+
"version": "2.147.3"
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
279
|
"Policy": {
|
|
@@ -371,13 +371,13 @@
|
|
|
371
371
|
},
|
|
372
372
|
"constructInfo": {
|
|
373
373
|
"fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy",
|
|
374
|
-
"version": "2.
|
|
374
|
+
"version": "2.147.3"
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
378
|
"constructInfo": {
|
|
379
379
|
"fqn": "aws-cdk-lib.aws_s3.BucketPolicy",
|
|
380
|
-
"version": "2.
|
|
380
|
+
"version": "2.147.3"
|
|
381
381
|
}
|
|
382
382
|
},
|
|
383
383
|
"AutoDeleteObjectsCustomResource": {
|
|
@@ -389,19 +389,19 @@
|
|
|
389
389
|
"path": "fhss3-no-arguments/test-firehose-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default",
|
|
390
390
|
"constructInfo": {
|
|
391
391
|
"fqn": "aws-cdk-lib.CfnResource",
|
|
392
|
-
"version": "2.
|
|
392
|
+
"version": "2.147.3"
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
"constructInfo": {
|
|
397
397
|
"fqn": "aws-cdk-lib.CustomResource",
|
|
398
|
-
"version": "2.
|
|
398
|
+
"version": "2.147.3"
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
},
|
|
402
402
|
"constructInfo": {
|
|
403
403
|
"fqn": "aws-cdk-lib.aws_s3.Bucket",
|
|
404
|
-
"version": "2.
|
|
404
|
+
"version": "2.147.3"
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
407
|
"firehose-log-group": {
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
},
|
|
418
418
|
"constructInfo": {
|
|
419
419
|
"fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
|
|
420
|
-
"version": "2.
|
|
420
|
+
"version": "2.147.3"
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
"firehose-log-stream": {
|
|
@@ -437,19 +437,19 @@
|
|
|
437
437
|
},
|
|
438
438
|
"constructInfo": {
|
|
439
439
|
"fqn": "aws-cdk-lib.aws_logs.CfnLogStream",
|
|
440
|
-
"version": "2.
|
|
440
|
+
"version": "2.147.3"
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
},
|
|
444
444
|
"constructInfo": {
|
|
445
445
|
"fqn": "aws-cdk-lib.aws_logs.LogStream",
|
|
446
|
-
"version": "2.
|
|
446
|
+
"version": "2.147.3"
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
},
|
|
450
450
|
"constructInfo": {
|
|
451
451
|
"fqn": "aws-cdk-lib.aws_logs.LogGroup",
|
|
452
|
-
"version": "2.
|
|
452
|
+
"version": "2.147.3"
|
|
453
453
|
}
|
|
454
454
|
},
|
|
455
455
|
"KinesisFirehoseRole": {
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
"path": "fhss3-no-arguments/test-firehose-s3/KinesisFirehoseRole/ImportKinesisFirehoseRole",
|
|
462
462
|
"constructInfo": {
|
|
463
463
|
"fqn": "aws-cdk-lib.Resource",
|
|
464
|
-
"version": "2.
|
|
464
|
+
"version": "2.147.3"
|
|
465
465
|
}
|
|
466
466
|
},
|
|
467
467
|
"Resource": {
|
|
@@ -486,13 +486,13 @@
|
|
|
486
486
|
},
|
|
487
487
|
"constructInfo": {
|
|
488
488
|
"fqn": "aws-cdk-lib.aws_iam.CfnRole",
|
|
489
|
-
"version": "2.
|
|
489
|
+
"version": "2.147.3"
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
},
|
|
493
493
|
"constructInfo": {
|
|
494
494
|
"fqn": "aws-cdk-lib.aws_iam.Role",
|
|
495
|
-
"version": "2.
|
|
495
|
+
"version": "2.147.3"
|
|
496
496
|
}
|
|
497
497
|
},
|
|
498
498
|
"KinesisFirehosePolicy": {
|
|
@@ -584,13 +584,13 @@
|
|
|
584
584
|
},
|
|
585
585
|
"constructInfo": {
|
|
586
586
|
"fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
|
|
587
|
-
"version": "2.
|
|
587
|
+
"version": "2.147.3"
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"constructInfo": {
|
|
592
592
|
"fqn": "aws-cdk-lib.aws_iam.Policy",
|
|
593
|
-
"version": "2.
|
|
593
|
+
"version": "2.147.3"
|
|
594
594
|
}
|
|
595
595
|
},
|
|
596
596
|
"KinesisFirehose": {
|
|
@@ -659,13 +659,21 @@
|
|
|
659
659
|
},
|
|
660
660
|
"constructInfo": {
|
|
661
661
|
"fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream",
|
|
662
|
-
"version": "2.
|
|
662
|
+
"version": "2.147.3"
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
},
|
|
666
666
|
"constructInfo": {
|
|
667
667
|
"fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3",
|
|
668
|
-
"version": "2.
|
|
668
|
+
"version": "2.60.0"
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"LatestNodeRuntimeMap": {
|
|
672
|
+
"id": "LatestNodeRuntimeMap",
|
|
673
|
+
"path": "fhss3-no-arguments/LatestNodeRuntimeMap",
|
|
674
|
+
"constructInfo": {
|
|
675
|
+
"fqn": "aws-cdk-lib.CfnMapping",
|
|
676
|
+
"version": "2.147.3"
|
|
669
677
|
}
|
|
670
678
|
},
|
|
671
679
|
"Custom::S3AutoDeleteObjectsCustomResourceProvider": {
|
|
@@ -677,7 +685,7 @@
|
|
|
677
685
|
"path": "fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging",
|
|
678
686
|
"constructInfo": {
|
|
679
687
|
"fqn": "aws-cdk-lib.AssetStaging",
|
|
680
|
-
"version": "2.
|
|
688
|
+
"version": "2.147.3"
|
|
681
689
|
}
|
|
682
690
|
},
|
|
683
691
|
"Role": {
|
|
@@ -685,7 +693,7 @@
|
|
|
685
693
|
"path": "fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role",
|
|
686
694
|
"constructInfo": {
|
|
687
695
|
"fqn": "aws-cdk-lib.CfnResource",
|
|
688
|
-
"version": "2.
|
|
696
|
+
"version": "2.147.3"
|
|
689
697
|
}
|
|
690
698
|
},
|
|
691
699
|
"Handler": {
|
|
@@ -693,13 +701,13 @@
|
|
|
693
701
|
"path": "fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler",
|
|
694
702
|
"constructInfo": {
|
|
695
703
|
"fqn": "aws-cdk-lib.CfnResource",
|
|
696
|
-
"version": "2.
|
|
704
|
+
"version": "2.147.3"
|
|
697
705
|
}
|
|
698
706
|
}
|
|
699
707
|
},
|
|
700
708
|
"constructInfo": {
|
|
701
709
|
"fqn": "aws-cdk-lib.CustomResourceProviderBase",
|
|
702
|
-
"version": "2.
|
|
710
|
+
"version": "2.147.3"
|
|
703
711
|
}
|
|
704
712
|
},
|
|
705
713
|
"test-firehose-s3aws-managed-key": {
|
|
@@ -707,7 +715,7 @@
|
|
|
707
715
|
"path": "fhss3-no-arguments/test-firehose-s3aws-managed-key",
|
|
708
716
|
"constructInfo": {
|
|
709
717
|
"fqn": "aws-cdk-lib.Resource",
|
|
710
|
-
"version": "2.
|
|
718
|
+
"version": "2.147.3"
|
|
711
719
|
}
|
|
712
720
|
},
|
|
713
721
|
"Integ": {
|
|
@@ -723,7 +731,7 @@
|
|
|
723
731
|
"path": "fhss3-no-arguments/Integ/DefaultTest/Default",
|
|
724
732
|
"constructInfo": {
|
|
725
733
|
"fqn": "constructs.Construct",
|
|
726
|
-
"version": "10.
|
|
734
|
+
"version": "10.3.0"
|
|
727
735
|
}
|
|
728
736
|
},
|
|
729
737
|
"DeployAssert": {
|
|
@@ -735,7 +743,7 @@
|
|
|
735
743
|
"path": "fhss3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion",
|
|
736
744
|
"constructInfo": {
|
|
737
745
|
"fqn": "aws-cdk-lib.CfnParameter",
|
|
738
|
-
"version": "2.
|
|
746
|
+
"version": "2.147.3"
|
|
739
747
|
}
|
|
740
748
|
},
|
|
741
749
|
"CheckBootstrapVersion": {
|
|
@@ -743,25 +751,25 @@
|
|
|
743
751
|
"path": "fhss3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
|
|
744
752
|
"constructInfo": {
|
|
745
753
|
"fqn": "aws-cdk-lib.CfnRule",
|
|
746
|
-
"version": "2.
|
|
754
|
+
"version": "2.147.3"
|
|
747
755
|
}
|
|
748
756
|
}
|
|
749
757
|
},
|
|
750
758
|
"constructInfo": {
|
|
751
759
|
"fqn": "aws-cdk-lib.Stack",
|
|
752
|
-
"version": "2.
|
|
760
|
+
"version": "2.147.3"
|
|
753
761
|
}
|
|
754
762
|
}
|
|
755
763
|
},
|
|
756
764
|
"constructInfo": {
|
|
757
765
|
"fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
|
|
758
|
-
"version": "2.
|
|
766
|
+
"version": "2.147.3-alpha.0"
|
|
759
767
|
}
|
|
760
768
|
}
|
|
761
769
|
},
|
|
762
770
|
"constructInfo": {
|
|
763
771
|
"fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
|
|
764
|
-
"version": "2.
|
|
772
|
+
"version": "2.147.3-alpha.0"
|
|
765
773
|
}
|
|
766
774
|
},
|
|
767
775
|
"BootstrapVersion": {
|
|
@@ -769,7 +777,7 @@
|
|
|
769
777
|
"path": "fhss3-no-arguments/BootstrapVersion",
|
|
770
778
|
"constructInfo": {
|
|
771
779
|
"fqn": "aws-cdk-lib.CfnParameter",
|
|
772
|
-
"version": "2.
|
|
780
|
+
"version": "2.147.3"
|
|
773
781
|
}
|
|
774
782
|
},
|
|
775
783
|
"CheckBootstrapVersion": {
|
|
@@ -777,13 +785,13 @@
|
|
|
777
785
|
"path": "fhss3-no-arguments/CheckBootstrapVersion",
|
|
778
786
|
"constructInfo": {
|
|
779
787
|
"fqn": "aws-cdk-lib.CfnRule",
|
|
780
|
-
"version": "2.
|
|
788
|
+
"version": "2.147.3"
|
|
781
789
|
}
|
|
782
790
|
}
|
|
783
791
|
},
|
|
784
792
|
"constructInfo": {
|
|
785
793
|
"fqn": "aws-cdk-lib.Stack",
|
|
786
|
-
"version": "2.
|
|
794
|
+
"version": "2.147.3"
|
|
787
795
|
}
|
|
788
796
|
},
|
|
789
797
|
"Tree": {
|
|
@@ -791,13 +799,13 @@
|
|
|
791
799
|
"path": "Tree",
|
|
792
800
|
"constructInfo": {
|
|
793
801
|
"fqn": "constructs.Construct",
|
|
794
|
-
"version": "10.
|
|
802
|
+
"version": "10.3.0"
|
|
795
803
|
}
|
|
796
804
|
}
|
|
797
805
|
},
|
|
798
806
|
"constructInfo": {
|
|
799
807
|
"fqn": "aws-cdk-lib.App",
|
|
800
|
-
"version": "2.
|
|
808
|
+
"version": "2.147.3"
|
|
801
809
|
}
|
|
802
810
|
}
|
|
803
811
|
}
|
|
@@ -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")}
|
package/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.assets.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "36.0.0",
|
|
3
3
|
"files": {
|
|
4
|
-
"
|
|
4
|
+
"faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": {
|
|
5
5
|
"source": {
|
|
6
|
-
"path": "asset.
|
|
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": "
|
|
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
|
-
"
|
|
17
|
+
"c857b22928a2a2242e8d634cd9794729ca1d2a5eb8770f491804b9fa7b7f22be": {
|
|
18
18
|
"source": {
|
|
19
19
|
"path": "fhss3-pre-existing-bucket.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": "
|
|
25
|
+
"objectKey": "c857b22928a2a2242e8d634cd9794729ca1d2a5eb8770f491804b9fa7b7f22be.json",
|
|
26
26
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.template.json
CHANGED
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
"S3Bucket": {
|
|
207
207
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
208
208
|
},
|
|
209
|
-
"S3Key": "
|
|
209
|
+
"S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip"
|
|
210
210
|
},
|
|
211
211
|
"Timeout": 900,
|
|
212
212
|
"MemorySize": 128,
|
|
@@ -217,7 +217,15 @@
|
|
|
217
217
|
"Arn"
|
|
218
218
|
]
|
|
219
219
|
},
|
|
220
|
-
"Runtime":
|
|
220
|
+
"Runtime": {
|
|
221
|
+
"Fn::FindInMap": [
|
|
222
|
+
"LatestNodeRuntimeMap",
|
|
223
|
+
{
|
|
224
|
+
"Ref": "AWS::Region"
|
|
225
|
+
},
|
|
226
|
+
"value"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
221
229
|
"Description": {
|
|
222
230
|
"Fn::Join": [
|
|
223
231
|
"",
|
|
@@ -596,6 +604,115 @@
|
|
|
596
604
|
}
|
|
597
605
|
}
|
|
598
606
|
},
|
|
607
|
+
"Mappings": {
|
|
608
|
+
"LatestNodeRuntimeMap": {
|
|
609
|
+
"af-south-1": {
|
|
610
|
+
"value": "nodejs20.x"
|
|
611
|
+
},
|
|
612
|
+
"ap-east-1": {
|
|
613
|
+
"value": "nodejs20.x"
|
|
614
|
+
},
|
|
615
|
+
"ap-northeast-1": {
|
|
616
|
+
"value": "nodejs20.x"
|
|
617
|
+
},
|
|
618
|
+
"ap-northeast-2": {
|
|
619
|
+
"value": "nodejs20.x"
|
|
620
|
+
},
|
|
621
|
+
"ap-northeast-3": {
|
|
622
|
+
"value": "nodejs20.x"
|
|
623
|
+
},
|
|
624
|
+
"ap-south-1": {
|
|
625
|
+
"value": "nodejs20.x"
|
|
626
|
+
},
|
|
627
|
+
"ap-south-2": {
|
|
628
|
+
"value": "nodejs20.x"
|
|
629
|
+
},
|
|
630
|
+
"ap-southeast-1": {
|
|
631
|
+
"value": "nodejs20.x"
|
|
632
|
+
},
|
|
633
|
+
"ap-southeast-2": {
|
|
634
|
+
"value": "nodejs20.x"
|
|
635
|
+
},
|
|
636
|
+
"ap-southeast-3": {
|
|
637
|
+
"value": "nodejs20.x"
|
|
638
|
+
},
|
|
639
|
+
"ap-southeast-4": {
|
|
640
|
+
"value": "nodejs20.x"
|
|
641
|
+
},
|
|
642
|
+
"ca-central-1": {
|
|
643
|
+
"value": "nodejs20.x"
|
|
644
|
+
},
|
|
645
|
+
"cn-north-1": {
|
|
646
|
+
"value": "nodejs18.x"
|
|
647
|
+
},
|
|
648
|
+
"cn-northwest-1": {
|
|
649
|
+
"value": "nodejs18.x"
|
|
650
|
+
},
|
|
651
|
+
"eu-central-1": {
|
|
652
|
+
"value": "nodejs20.x"
|
|
653
|
+
},
|
|
654
|
+
"eu-central-2": {
|
|
655
|
+
"value": "nodejs20.x"
|
|
656
|
+
},
|
|
657
|
+
"eu-north-1": {
|
|
658
|
+
"value": "nodejs20.x"
|
|
659
|
+
},
|
|
660
|
+
"eu-south-1": {
|
|
661
|
+
"value": "nodejs20.x"
|
|
662
|
+
},
|
|
663
|
+
"eu-south-2": {
|
|
664
|
+
"value": "nodejs20.x"
|
|
665
|
+
},
|
|
666
|
+
"eu-west-1": {
|
|
667
|
+
"value": "nodejs20.x"
|
|
668
|
+
},
|
|
669
|
+
"eu-west-2": {
|
|
670
|
+
"value": "nodejs20.x"
|
|
671
|
+
},
|
|
672
|
+
"eu-west-3": {
|
|
673
|
+
"value": "nodejs20.x"
|
|
674
|
+
},
|
|
675
|
+
"il-central-1": {
|
|
676
|
+
"value": "nodejs20.x"
|
|
677
|
+
},
|
|
678
|
+
"me-central-1": {
|
|
679
|
+
"value": "nodejs20.x"
|
|
680
|
+
},
|
|
681
|
+
"me-south-1": {
|
|
682
|
+
"value": "nodejs20.x"
|
|
683
|
+
},
|
|
684
|
+
"sa-east-1": {
|
|
685
|
+
"value": "nodejs20.x"
|
|
686
|
+
},
|
|
687
|
+
"us-east-1": {
|
|
688
|
+
"value": "nodejs20.x"
|
|
689
|
+
},
|
|
690
|
+
"us-east-2": {
|
|
691
|
+
"value": "nodejs20.x"
|
|
692
|
+
},
|
|
693
|
+
"us-gov-east-1": {
|
|
694
|
+
"value": "nodejs18.x"
|
|
695
|
+
},
|
|
696
|
+
"us-gov-west-1": {
|
|
697
|
+
"value": "nodejs18.x"
|
|
698
|
+
},
|
|
699
|
+
"us-iso-east-1": {
|
|
700
|
+
"value": "nodejs18.x"
|
|
701
|
+
},
|
|
702
|
+
"us-iso-west-1": {
|
|
703
|
+
"value": "nodejs18.x"
|
|
704
|
+
},
|
|
705
|
+
"us-isob-east-1": {
|
|
706
|
+
"value": "nodejs18.x"
|
|
707
|
+
},
|
|
708
|
+
"us-west-1": {
|
|
709
|
+
"value": "nodejs20.x"
|
|
710
|
+
},
|
|
711
|
+
"us-west-2": {
|
|
712
|
+
"value": "nodejs20.x"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
},
|
|
599
716
|
"Parameters": {
|
|
600
717
|
"BootstrapVersion": {
|
|
601
718
|
"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}/
|
|
69
|
+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c857b22928a2a2242e8d634cd9794729ca1d2a5eb8770f491804b9fa7b7f22be.json",
|
|
70
70
|
"requiresBootstrapStackVersion": 6,
|
|
71
71
|
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
72
72
|
"additionalDependencies": [
|
|
@@ -100,6 +100,12 @@
|
|
|
100
100
|
"data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47"
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
|
+
"/fhss3-pre-existing-bucket/LatestNodeRuntimeMap": [
|
|
104
|
+
{
|
|
105
|
+
"type": "aws:cdk:logicalId",
|
|
106
|
+
"data": "LatestNodeRuntimeMap"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
103
109
|
"/fhss3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [
|
|
104
110
|
{
|
|
105
111
|
"type": "aws:cdk:logicalId",
|