@aws-solutions-constructs/aws-lambda-kinesisstreams 2.76.0 → 2.78.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 (42) hide show
  1. package/.jsii +57 -18
  2. package/lib/index.js +1 -1
  3. package/package.json +9 -8
  4. package/test/integ.lamkin-existingLambda.js +1 -2
  5. package/test/integ.lamkin-existingStream.js +1 -2
  6. package/test/integ.lamkin-existingStreamWithCmk.js +1 -2
  7. package/test/integ.lamkin-existingVpc.js +1 -2
  8. package/test/integ.lamkin-existingVpc.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  9. package/test/integ.lamkin-existingVpc.js.snapshot/cdk.out +1 -1
  10. package/test/integ.lamkin-existingVpc.js.snapshot/integ.json +1 -1
  11. package/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json +6 -6
  12. package/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json +7 -1
  13. package/test/integ.lamkin-existingVpc.js.snapshot/lamkinexistingVpcIntegDefaultTestDeployAssertB97E47BA.assets.json +1 -1
  14. package/test/integ.lamkin-existingVpc.js.snapshot/manifest.json +8 -2
  15. package/test/integ.lamkin-existingVpc.js.snapshot/tree.json +88 -82
  16. package/test/integ.lamkin-newStreamFromProps.js +1 -2
  17. package/test/integ.lamkin-newVpc.js +1 -2
  18. package/test/integ.lamkin-newVpc.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  19. package/test/integ.lamkin-newVpc.js.snapshot/cdk.out +1 -1
  20. package/test/integ.lamkin-newVpc.js.snapshot/integ.json +1 -1
  21. package/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json +6 -6
  22. package/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json +7 -1
  23. package/test/integ.lamkin-newVpc.js.snapshot/lamkinnewVpcIntegDefaultTestDeployAssert16AC3D59.assets.json +1 -1
  24. package/test/integ.lamkin-newVpc.js.snapshot/manifest.json +8 -2
  25. package/test/integ.lamkin-newVpc.js.snapshot/tree.json +68 -62
  26. package/test/integ.lamkin-newVpcFromProps.js +1 -2
  27. package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  28. package/test/integ.lamkin-newVpcFromProps.js.snapshot/cdk.out +1 -1
  29. package/test/integ.lamkin-newVpcFromProps.js.snapshot/integ.json +1 -1
  30. package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json +6 -6
  31. package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json +7 -1
  32. package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkinnewVpcFromPropsIntegDefaultTestDeployAssert95FE0487.assets.json +1 -1
  33. package/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json +8 -2
  34. package/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json +63 -57
  35. package/test/integ.lamkin-noArguments.js +1 -2
  36. package/.eslintignore +0 -7
  37. package/test/integ.lamkin-existingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
  38. package/test/integ.lamkin-newVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
  39. package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
  40. /package/test/integ.lamkin-existingVpc.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
  41. /package/test/integ.lamkin-newVpc.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
  42. /package/test/integ.lamkin-newVpcFromProps.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
@@ -21,7 +21,7 @@
21
21
  "path": "lamkin-newVpcFromProps/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole",
22
22
  "constructInfo": {
23
23
  "fqn": "aws-cdk-lib.Resource",
24
- "version": "2.150.0"
24
+ "version": "2.174.0"
25
25
  }
26
26
  },
27
27
  "Resource": {
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "constructInfo": {
86
86
  "fqn": "aws-cdk-lib.aws_iam.CfnRole",
87
- "version": "2.150.0"
87
+ "version": "2.174.0"
88
88
  }
89
89
  },
90
90
  "DefaultPolicy": {
@@ -139,19 +139,19 @@
139
139
  },
140
140
  "constructInfo": {
141
141
  "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
142
- "version": "2.150.0"
142
+ "version": "2.174.0"
143
143
  }
144
144
  }
145
145
  },
146
146
  "constructInfo": {
147
147
  "fqn": "aws-cdk-lib.aws_iam.Policy",
148
- "version": "2.150.0"
148
+ "version": "2.174.0"
149
149
  }
150
150
  }
151
151
  },
152
152
  "constructInfo": {
153
153
  "fqn": "aws-cdk-lib.aws_iam.Role",
154
- "version": "2.150.0"
154
+ "version": "2.174.0"
155
155
  }
156
156
  },
157
157
  "ReplaceDefaultSecurityGroup-security-group": {
@@ -179,13 +179,13 @@
179
179
  },
180
180
  "constructInfo": {
181
181
  "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup",
182
- "version": "2.150.0"
182
+ "version": "2.174.0"
183
183
  }
184
184
  }
185
185
  },
186
186
  "constructInfo": {
187
187
  "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup",
188
- "version": "2.150.0"
188
+ "version": "2.174.0"
189
189
  }
190
190
  },
191
191
  "LambdaFunction": {
@@ -201,7 +201,7 @@
201
201
  "path": "lamkin-newVpcFromProps/test-lambda-kinesisstreams/LambdaFunction/Code/Stage",
202
202
  "constructInfo": {
203
203
  "fqn": "aws-cdk-lib.AssetStaging",
204
- "version": "2.150.0"
204
+ "version": "2.174.0"
205
205
  }
206
206
  },
207
207
  "AssetBucket": {
@@ -209,13 +209,13 @@
209
209
  "path": "lamkin-newVpcFromProps/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket",
210
210
  "constructInfo": {
211
211
  "fqn": "aws-cdk-lib.aws_s3.BucketBase",
212
- "version": "2.150.0"
212
+ "version": "2.174.0"
213
213
  }
214
214
  }
215
215
  },
216
216
  "constructInfo": {
217
217
  "fqn": "aws-cdk-lib.aws_s3_assets.Asset",
218
- "version": "2.150.0"
218
+ "version": "2.174.0"
219
219
  }
220
220
  },
221
221
  "Resource": {
@@ -268,13 +268,13 @@
268
268
  },
269
269
  "constructInfo": {
270
270
  "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
271
- "version": "2.150.0"
271
+ "version": "2.174.0"
272
272
  }
273
273
  }
274
274
  },
275
275
  "constructInfo": {
276
276
  "fqn": "aws-cdk-lib.aws_lambda.Function",
277
- "version": "2.150.0"
277
+ "version": "2.174.0"
278
278
  }
279
279
  },
280
280
  "KinesisStream": {
@@ -297,13 +297,13 @@
297
297
  },
298
298
  "constructInfo": {
299
299
  "fqn": "aws-cdk-lib.aws_kinesis.CfnStream",
300
- "version": "2.150.0"
300
+ "version": "2.174.0"
301
301
  }
302
302
  }
303
303
  },
304
304
  "constructInfo": {
305
305
  "fqn": "aws-cdk-lib.aws_kinesis.Stream",
306
- "version": "2.150.0"
306
+ "version": "2.174.0"
307
307
  }
308
308
  },
309
309
  "KinesisStreamGetRecordsIteratorAgeAlarm": {
@@ -328,13 +328,13 @@
328
328
  },
329
329
  "constructInfo": {
330
330
  "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
331
- "version": "2.150.0"
331
+ "version": "2.174.0"
332
332
  }
333
333
  }
334
334
  },
335
335
  "constructInfo": {
336
336
  "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
337
- "version": "2.150.0"
337
+ "version": "2.174.0"
338
338
  }
339
339
  },
340
340
  "KinesisStreamReadProvisionedThroughputExceededAlarm": {
@@ -359,19 +359,19 @@
359
359
  },
360
360
  "constructInfo": {
361
361
  "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
362
- "version": "2.150.0"
362
+ "version": "2.174.0"
363
363
  }
364
364
  }
365
365
  },
366
366
  "constructInfo": {
367
367
  "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
368
- "version": "2.150.0"
368
+ "version": "2.174.0"
369
369
  }
370
370
  }
371
371
  },
372
372
  "constructInfo": {
373
373
  "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams",
374
- "version": "2.63.0"
374
+ "version": "2.76.0"
375
375
  }
376
376
  },
377
377
  "Vpc": {
@@ -398,7 +398,7 @@
398
398
  },
399
399
  "constructInfo": {
400
400
  "fqn": "aws-cdk-lib.aws_ec2.CfnVPC",
401
- "version": "2.150.0"
401
+ "version": "2.174.0"
402
402
  }
403
403
  },
404
404
  "isolatedSubnet1": {
@@ -442,7 +442,7 @@
442
442
  },
443
443
  "constructInfo": {
444
444
  "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet",
445
- "version": "2.150.0"
445
+ "version": "2.174.0"
446
446
  }
447
447
  },
448
448
  "Acl": {
@@ -450,7 +450,7 @@
450
450
  "path": "lamkin-newVpcFromProps/Vpc/isolatedSubnet1/Acl",
451
451
  "constructInfo": {
452
452
  "fqn": "aws-cdk-lib.Resource",
453
- "version": "2.150.0"
453
+ "version": "2.174.0"
454
454
  }
455
455
  },
456
456
  "RouteTable": {
@@ -472,7 +472,7 @@
472
472
  },
473
473
  "constructInfo": {
474
474
  "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable",
475
- "version": "2.150.0"
475
+ "version": "2.174.0"
476
476
  }
477
477
  },
478
478
  "RouteTableAssociation": {
@@ -491,13 +491,13 @@
491
491
  },
492
492
  "constructInfo": {
493
493
  "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation",
494
- "version": "2.150.0"
494
+ "version": "2.174.0"
495
495
  }
496
496
  }
497
497
  },
498
498
  "constructInfo": {
499
499
  "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet",
500
- "version": "2.150.0"
500
+ "version": "2.174.0"
501
501
  }
502
502
  },
503
503
  "RestrictDefaultSecurityGroupCustomResource": {
@@ -509,13 +509,13 @@
509
509
  "path": "lamkin-newVpcFromProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default",
510
510
  "constructInfo": {
511
511
  "fqn": "aws-cdk-lib.CfnResource",
512
- "version": "2.150.0"
512
+ "version": "2.174.0"
513
513
  }
514
514
  }
515
515
  },
516
516
  "constructInfo": {
517
517
  "fqn": "aws-cdk-lib.CustomResource",
518
- "version": "2.150.0"
518
+ "version": "2.174.0"
519
519
  }
520
520
  },
521
521
  "FlowLog": {
@@ -531,7 +531,7 @@
531
531
  "path": "lamkin-newVpcFromProps/Vpc/FlowLog/IAMRole/ImportIAMRole",
532
532
  "constructInfo": {
533
533
  "fqn": "aws-cdk-lib.Resource",
534
- "version": "2.150.0"
534
+ "version": "2.174.0"
535
535
  }
536
536
  },
537
537
  "Resource": {
@@ -562,7 +562,7 @@
562
562
  },
563
563
  "constructInfo": {
564
564
  "fqn": "aws-cdk-lib.aws_iam.CfnRole",
565
- "version": "2.150.0"
565
+ "version": "2.174.0"
566
566
  }
567
567
  },
568
568
  "DefaultPolicy": {
@@ -614,19 +614,19 @@
614
614
  },
615
615
  "constructInfo": {
616
616
  "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
617
- "version": "2.150.0"
617
+ "version": "2.174.0"
618
618
  }
619
619
  }
620
620
  },
621
621
  "constructInfo": {
622
622
  "fqn": "aws-cdk-lib.aws_iam.Policy",
623
- "version": "2.150.0"
623
+ "version": "2.174.0"
624
624
  }
625
625
  }
626
626
  },
627
627
  "constructInfo": {
628
628
  "fqn": "aws-cdk-lib.aws_iam.Role",
629
- "version": "2.150.0"
629
+ "version": "2.174.0"
630
630
  }
631
631
  },
632
632
  "LogGroup": {
@@ -650,13 +650,13 @@
650
650
  },
651
651
  "constructInfo": {
652
652
  "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
653
- "version": "2.150.0"
653
+ "version": "2.174.0"
654
654
  }
655
655
  }
656
656
  },
657
657
  "constructInfo": {
658
658
  "fqn": "aws-cdk-lib.aws_logs.LogGroup",
659
- "version": "2.150.0"
659
+ "version": "2.174.0"
660
660
  }
661
661
  },
662
662
  "FlowLog": {
@@ -690,13 +690,13 @@
690
690
  },
691
691
  "constructInfo": {
692
692
  "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog",
693
- "version": "2.150.0"
693
+ "version": "2.174.0"
694
694
  }
695
695
  }
696
696
  },
697
697
  "constructInfo": {
698
698
  "fqn": "aws-cdk-lib.aws_ec2.FlowLog",
699
- "version": "2.150.0"
699
+ "version": "2.174.0"
700
700
  }
701
701
  },
702
702
  "KINESIS_STREAMS": {
@@ -709,6 +709,12 @@
709
709
  "attributes": {
710
710
  "aws:cdk:cloudformation:type": "AWS::EC2::VPCEndpoint",
711
711
  "aws:cdk:cloudformation:props": {
712
+ "tags": [
713
+ {
714
+ "key": "Name",
715
+ "value": "lamkin-newVpcFromProps/Vpc"
716
+ }
717
+ ],
712
718
  "privateDnsEnabled": true,
713
719
  "securityGroupIds": [
714
720
  {
@@ -743,19 +749,19 @@
743
749
  },
744
750
  "constructInfo": {
745
751
  "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint",
746
- "version": "2.150.0"
752
+ "version": "2.174.0"
747
753
  }
748
754
  }
749
755
  },
750
756
  "constructInfo": {
751
757
  "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint",
752
- "version": "2.150.0"
758
+ "version": "2.174.0"
753
759
  }
754
760
  }
755
761
  },
756
762
  "constructInfo": {
757
763
  "fqn": "aws-cdk-lib.aws_ec2.Vpc",
758
- "version": "2.150.0"
764
+ "version": "2.174.0"
759
765
  }
760
766
  },
761
767
  "LatestNodeRuntimeMap": {
@@ -763,7 +769,7 @@
763
769
  "path": "lamkin-newVpcFromProps/LatestNodeRuntimeMap",
764
770
  "constructInfo": {
765
771
  "fqn": "aws-cdk-lib.CfnMapping",
766
- "version": "2.150.0"
772
+ "version": "2.174.0"
767
773
  }
768
774
  },
769
775
  "Custom::VpcRestrictDefaultSGCustomResourceProvider": {
@@ -775,7 +781,7 @@
775
781
  "path": "lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging",
776
782
  "constructInfo": {
777
783
  "fqn": "aws-cdk-lib.AssetStaging",
778
- "version": "2.150.0"
784
+ "version": "2.174.0"
779
785
  }
780
786
  },
781
787
  "Role": {
@@ -783,7 +789,7 @@
783
789
  "path": "lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role",
784
790
  "constructInfo": {
785
791
  "fqn": "aws-cdk-lib.CfnResource",
786
- "version": "2.150.0"
792
+ "version": "2.174.0"
787
793
  }
788
794
  },
789
795
  "Handler": {
@@ -791,13 +797,13 @@
791
797
  "path": "lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler",
792
798
  "constructInfo": {
793
799
  "fqn": "aws-cdk-lib.CfnResource",
794
- "version": "2.150.0"
800
+ "version": "2.174.0"
795
801
  }
796
802
  }
797
803
  },
798
804
  "constructInfo": {
799
805
  "fqn": "aws-cdk-lib.CustomResourceProviderBase",
800
- "version": "2.150.0"
806
+ "version": "2.174.0"
801
807
  }
802
808
  },
803
809
  "lamkin-newVpcFromProps-KINESIS_STREAMS-security-group": {
@@ -853,13 +859,13 @@
853
859
  },
854
860
  "constructInfo": {
855
861
  "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup",
856
- "version": "2.150.0"
862
+ "version": "2.174.0"
857
863
  }
858
864
  }
859
865
  },
860
866
  "constructInfo": {
861
867
  "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup",
862
- "version": "2.150.0"
868
+ "version": "2.174.0"
863
869
  }
864
870
  },
865
871
  "Integ": {
@@ -875,7 +881,7 @@
875
881
  "path": "lamkin-newVpcFromProps/Integ/DefaultTest/Default",
876
882
  "constructInfo": {
877
883
  "fqn": "constructs.Construct",
878
- "version": "10.3.0"
884
+ "version": "10.4.2"
879
885
  }
880
886
  },
881
887
  "DeployAssert": {
@@ -887,7 +893,7 @@
887
893
  "path": "lamkin-newVpcFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion",
888
894
  "constructInfo": {
889
895
  "fqn": "aws-cdk-lib.CfnParameter",
890
- "version": "2.150.0"
896
+ "version": "2.174.0"
891
897
  }
892
898
  },
893
899
  "CheckBootstrapVersion": {
@@ -895,25 +901,25 @@
895
901
  "path": "lamkin-newVpcFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
896
902
  "constructInfo": {
897
903
  "fqn": "aws-cdk-lib.CfnRule",
898
- "version": "2.150.0"
904
+ "version": "2.174.0"
899
905
  }
900
906
  }
901
907
  },
902
908
  "constructInfo": {
903
909
  "fqn": "aws-cdk-lib.Stack",
904
- "version": "2.150.0"
910
+ "version": "2.174.0"
905
911
  }
906
912
  }
907
913
  },
908
914
  "constructInfo": {
909
915
  "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
910
- "version": "2.150.0-alpha.0"
916
+ "version": "2.174.0-alpha.0"
911
917
  }
912
918
  }
913
919
  },
914
920
  "constructInfo": {
915
921
  "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
916
- "version": "2.150.0-alpha.0"
922
+ "version": "2.174.0-alpha.0"
917
923
  }
918
924
  },
919
925
  "BootstrapVersion": {
@@ -921,7 +927,7 @@
921
927
  "path": "lamkin-newVpcFromProps/BootstrapVersion",
922
928
  "constructInfo": {
923
929
  "fqn": "aws-cdk-lib.CfnParameter",
924
- "version": "2.150.0"
930
+ "version": "2.174.0"
925
931
  }
926
932
  },
927
933
  "CheckBootstrapVersion": {
@@ -929,13 +935,13 @@
929
935
  "path": "lamkin-newVpcFromProps/CheckBootstrapVersion",
930
936
  "constructInfo": {
931
937
  "fqn": "aws-cdk-lib.CfnRule",
932
- "version": "2.150.0"
938
+ "version": "2.174.0"
933
939
  }
934
940
  }
935
941
  },
936
942
  "constructInfo": {
937
943
  "fqn": "aws-cdk-lib.Stack",
938
- "version": "2.150.0"
944
+ "version": "2.174.0"
939
945
  }
940
946
  },
941
947
  "Tree": {
@@ -943,13 +949,13 @@
943
949
  "path": "Tree",
944
950
  "constructInfo": {
945
951
  "fqn": "constructs.Construct",
946
- "version": "10.3.0"
952
+ "version": "10.4.2"
947
953
  }
948
954
  }
949
955
  },
950
956
  "constructInfo": {
951
957
  "fqn": "aws-cdk-lib.App",
952
- "version": "2.150.0"
958
+ "version": "2.174.0"
953
959
  }
954
960
  }
955
961
  }
@@ -12,7 +12,6 @@
12
12
  * and limitations under the License.
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- /// !cdk-integ *
16
15
  const aws_cdk_lib_1 = require("aws-cdk-lib");
17
16
  const lib_1 = require("../lib");
18
17
  const core_1 = require("@aws-solutions-constructs/core");
@@ -31,4 +30,4 @@ new lib_1.LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', {
31
30
  new integ_tests_alpha_1.IntegTest(stack, 'Integ', { testCases: [
32
31
  stack
33
32
  ] });
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcubGF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ICAgaGFuZGxlcjogJ2luZGV4LmhhbmRsZXInXG4gIH0sXG59KTtcblxubmV3IEludGVnVGVzdChzdGFjaywgJ0ludGVnJywgeyB0ZXN0Q2FzZXM6IFtcbiAgc3RhY2tcbl0gfSk7XG4iXX0=
package/.eslintignore DELETED
@@ -1,7 +0,0 @@
1
- lib/*.js
2
- test/*.js
3
- *.d.ts
4
- coverage
5
- test/integ.*.js.snapshot/
6
- test/cdk-integ.out.integ.*.snapshot
7
- test/lambda/index.js
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}exports.withRetries=withRetries;async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}exports.withRetries=withRetries;async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}exports.withRetries=withRetries;async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}