@aws-solutions-constructs/aws-alb-lambda 2.0.0 → 2.1.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 +235 -27
- package/README.md +3 -3
- package/lib/index.d.ts +2 -2
- package/lib/index.js +10 -40
- package/package.json +8 -8
- package/test/alb-lambda.test.d.ts +1 -1
- package/test/alb-lambda.test.js +49 -63
- package/test/integ.privateApiExistingResources.d.ts +1 -1
- package/test/integ.privateApiExistingResources.expected.json +18 -13
- package/test/integ.privateApiExistingResources.js +4 -11
- package/test/integ.privateApiNewResources.d.ts +1 -1
- package/test/integ.privateApiNewResources.expected.json +18 -13
- package/test/integ.privateApiNewResources.js +3 -3
- package/test/integ.publicApiExistingResources.d.ts +1 -1
- package/test/integ.publicApiExistingResources.expected.json +18 -13
- package/test/integ.publicApiExistingResources.js +4 -11
- package/test/integ.publicApiNewResources.d.ts +1 -1
- package/test/integ.publicApiNewResources.expected.json +18 -13
- package/test/integ.publicApiNewResources.js +3 -3
- package/test/integ.twoTargets.d.ts +1 -1
- package/test/integ.twoTargets.expected.json +21 -16
- package/test/integ.twoTargets.js +4 -4
package/.jsii
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-solutions-constructs/core": "2.
|
|
12
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"@aws-solutions-constructs/core": "2.1.0",
|
|
12
|
+
"aws-cdk-lib": "^2.4.0",
|
|
13
13
|
"constructs": "^10.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencyClosure": {
|
|
@@ -52,6 +52,19 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
+
"aws-cdk-lib.assertions": {
|
|
56
|
+
"targets": {
|
|
57
|
+
"dotnet": {
|
|
58
|
+
"namespace": "Amazon.CDK.Assertions"
|
|
59
|
+
},
|
|
60
|
+
"java": {
|
|
61
|
+
"package": "software.amazon.awscdk.assertions"
|
|
62
|
+
},
|
|
63
|
+
"python": {
|
|
64
|
+
"module": "aws_cdk.assertions"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
55
68
|
"aws-cdk-lib.assets": {
|
|
56
69
|
"targets": {
|
|
57
70
|
"dotnet": {
|
|
@@ -117,6 +130,19 @@
|
|
|
117
130
|
}
|
|
118
131
|
}
|
|
119
132
|
},
|
|
133
|
+
"aws-cdk-lib.aws_amplifyuibuilder": {
|
|
134
|
+
"targets": {
|
|
135
|
+
"dotnet": {
|
|
136
|
+
"namespace": "Amazon.CDK.AWS.AmplifyUIBuilder"
|
|
137
|
+
},
|
|
138
|
+
"java": {
|
|
139
|
+
"package": "software.amazon.awscdk.services.amplifyuibuilder"
|
|
140
|
+
},
|
|
141
|
+
"python": {
|
|
142
|
+
"module": "aws_cdk.aws_amplifyuibuilder"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
120
146
|
"aws-cdk-lib.aws_apigateway": {
|
|
121
147
|
"targets": {
|
|
122
148
|
"dotnet": {
|
|
@@ -250,7 +276,7 @@
|
|
|
250
276
|
"aws-cdk-lib.aws_appsync": {
|
|
251
277
|
"targets": {
|
|
252
278
|
"dotnet": {
|
|
253
|
-
"namespace": "Amazon.CDK.AWS.
|
|
279
|
+
"namespace": "Amazon.CDK.AWS.AppSync"
|
|
254
280
|
},
|
|
255
281
|
"java": {
|
|
256
282
|
"package": "software.amazon.awscdk.services.appsync"
|
|
@@ -260,6 +286,19 @@
|
|
|
260
286
|
}
|
|
261
287
|
}
|
|
262
288
|
},
|
|
289
|
+
"aws-cdk-lib.aws_aps": {
|
|
290
|
+
"targets": {
|
|
291
|
+
"dotnet": {
|
|
292
|
+
"namespace": "Amazon.CDK.AWS.APS"
|
|
293
|
+
},
|
|
294
|
+
"java": {
|
|
295
|
+
"package": "software.amazon.awscdk.services.aps"
|
|
296
|
+
},
|
|
297
|
+
"python": {
|
|
298
|
+
"module": "aws_cdk.aws_aps"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
263
302
|
"aws-cdk-lib.aws_athena": {
|
|
264
303
|
"targets": {
|
|
265
304
|
"dotnet": {
|
|
@@ -1119,6 +1158,19 @@
|
|
|
1119
1158
|
}
|
|
1120
1159
|
}
|
|
1121
1160
|
},
|
|
1161
|
+
"aws-cdk-lib.aws_evidently": {
|
|
1162
|
+
"targets": {
|
|
1163
|
+
"dotnet": {
|
|
1164
|
+
"namespace": "Amazon.CDK.AWS.Evidently"
|
|
1165
|
+
},
|
|
1166
|
+
"java": {
|
|
1167
|
+
"package": "software.amazon.awscdk.services.evidently"
|
|
1168
|
+
},
|
|
1169
|
+
"python": {
|
|
1170
|
+
"module": "aws_cdk.aws_evidently"
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1122
1174
|
"aws-cdk-lib.aws_finspace": {
|
|
1123
1175
|
"targets": {
|
|
1124
1176
|
"dotnet": {
|
|
@@ -1288,6 +1340,19 @@
|
|
|
1288
1340
|
}
|
|
1289
1341
|
}
|
|
1290
1342
|
},
|
|
1343
|
+
"aws-cdk-lib.aws_healthlake": {
|
|
1344
|
+
"targets": {
|
|
1345
|
+
"dotnet": {
|
|
1346
|
+
"namespace": "Amazon.CDK.AWS.HealthLake"
|
|
1347
|
+
},
|
|
1348
|
+
"java": {
|
|
1349
|
+
"package": "software.amazon.awscdk.services.healthlake"
|
|
1350
|
+
},
|
|
1351
|
+
"python": {
|
|
1352
|
+
"module": "aws_cdk.aws_healthlake"
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1291
1356
|
"aws-cdk-lib.aws_iam": {
|
|
1292
1357
|
"targets": {
|
|
1293
1358
|
"dotnet": {
|
|
@@ -1587,6 +1652,19 @@
|
|
|
1587
1652
|
}
|
|
1588
1653
|
}
|
|
1589
1654
|
},
|
|
1655
|
+
"aws-cdk-lib.aws_lex": {
|
|
1656
|
+
"targets": {
|
|
1657
|
+
"dotnet": {
|
|
1658
|
+
"namespace": "Amazon.CDK.AWS.Lex"
|
|
1659
|
+
},
|
|
1660
|
+
"java": {
|
|
1661
|
+
"package": "software.amazon.awscdk.services.lex"
|
|
1662
|
+
},
|
|
1663
|
+
"python": {
|
|
1664
|
+
"module": "aws_cdk.aws_lex"
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1590
1668
|
"aws-cdk-lib.aws_licensemanager": {
|
|
1591
1669
|
"targets": {
|
|
1592
1670
|
"dotnet": {
|
|
@@ -1600,6 +1678,19 @@
|
|
|
1600
1678
|
}
|
|
1601
1679
|
}
|
|
1602
1680
|
},
|
|
1681
|
+
"aws-cdk-lib.aws_lightsail": {
|
|
1682
|
+
"targets": {
|
|
1683
|
+
"dotnet": {
|
|
1684
|
+
"namespace": "Amazon.CDK.AWS.Lightsail"
|
|
1685
|
+
},
|
|
1686
|
+
"java": {
|
|
1687
|
+
"package": "software.amazon.awscdk.services.lightsail"
|
|
1688
|
+
},
|
|
1689
|
+
"python": {
|
|
1690
|
+
"module": "aws_cdk.aws_lightsail"
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1603
1694
|
"aws-cdk-lib.aws_location": {
|
|
1604
1695
|
"targets": {
|
|
1605
1696
|
"dotnet": {
|
|
@@ -1769,10 +1860,23 @@
|
|
|
1769
1860
|
}
|
|
1770
1861
|
}
|
|
1771
1862
|
},
|
|
1863
|
+
"aws-cdk-lib.aws_memorydb": {
|
|
1864
|
+
"targets": {
|
|
1865
|
+
"dotnet": {
|
|
1866
|
+
"namespace": "Amazon.CDK.AWS.MemoryDB"
|
|
1867
|
+
},
|
|
1868
|
+
"java": {
|
|
1869
|
+
"package": "software.amazon.awscdk.services.memorydb"
|
|
1870
|
+
},
|
|
1871
|
+
"python": {
|
|
1872
|
+
"module": "aws_cdk.aws_memorydb"
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1772
1876
|
"aws-cdk-lib.aws_msk": {
|
|
1773
1877
|
"targets": {
|
|
1774
1878
|
"dotnet": {
|
|
1775
|
-
"namespace": "Amazon.CDK.AWS.
|
|
1879
|
+
"namespace": "Amazon.CDK.AWS.MSK"
|
|
1776
1880
|
},
|
|
1777
1881
|
"java": {
|
|
1778
1882
|
"package": "software.amazon.awscdk.services.msk"
|
|
@@ -1847,6 +1951,19 @@
|
|
|
1847
1951
|
}
|
|
1848
1952
|
}
|
|
1849
1953
|
},
|
|
1954
|
+
"aws-cdk-lib.aws_opensearchservice": {
|
|
1955
|
+
"targets": {
|
|
1956
|
+
"dotnet": {
|
|
1957
|
+
"namespace": "Amazon.CDK.AWS.OpenSearchService"
|
|
1958
|
+
},
|
|
1959
|
+
"java": {
|
|
1960
|
+
"package": "software.amazon.awscdk.services.opensearchservice"
|
|
1961
|
+
},
|
|
1962
|
+
"python": {
|
|
1963
|
+
"module": "aws_cdk.aws_opensearchservice"
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
},
|
|
1850
1967
|
"aws-cdk-lib.aws_opsworks": {
|
|
1851
1968
|
"targets": {
|
|
1852
1969
|
"dotnet": {
|
|
@@ -1873,6 +1990,19 @@
|
|
|
1873
1990
|
}
|
|
1874
1991
|
}
|
|
1875
1992
|
},
|
|
1993
|
+
"aws-cdk-lib.aws_panorama": {
|
|
1994
|
+
"targets": {
|
|
1995
|
+
"dotnet": {
|
|
1996
|
+
"namespace": "Amazon.CDK.AWS.Panorama"
|
|
1997
|
+
},
|
|
1998
|
+
"java": {
|
|
1999
|
+
"package": "software.amazon.awscdk.services.panorama"
|
|
2000
|
+
},
|
|
2001
|
+
"python": {
|
|
2002
|
+
"module": "aws_cdk.aws_panorama"
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
1876
2006
|
"aws-cdk-lib.aws_pinpoint": {
|
|
1877
2007
|
"targets": {
|
|
1878
2008
|
"dotnet": {
|
|
@@ -1964,6 +2094,45 @@
|
|
|
1964
2094
|
}
|
|
1965
2095
|
}
|
|
1966
2096
|
},
|
|
2097
|
+
"aws-cdk-lib.aws_refactorspaces": {
|
|
2098
|
+
"targets": {
|
|
2099
|
+
"dotnet": {
|
|
2100
|
+
"namespace": "Amazon.CDK.AWS.RefactorSpaces"
|
|
2101
|
+
},
|
|
2102
|
+
"java": {
|
|
2103
|
+
"package": "software.amazon.awscdk.services.refactorspaces"
|
|
2104
|
+
},
|
|
2105
|
+
"python": {
|
|
2106
|
+
"module": "aws_cdk.aws_refactorspaces"
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
2110
|
+
"aws-cdk-lib.aws_rekognition": {
|
|
2111
|
+
"targets": {
|
|
2112
|
+
"dotnet": {
|
|
2113
|
+
"namespace": "Amazon.CDK.AWS.Rekognition"
|
|
2114
|
+
},
|
|
2115
|
+
"java": {
|
|
2116
|
+
"package": "software.amazon.awscdk.services.rekognition"
|
|
2117
|
+
},
|
|
2118
|
+
"python": {
|
|
2119
|
+
"module": "aws_cdk.aws_rekognition"
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
},
|
|
2123
|
+
"aws-cdk-lib.aws_resiliencehub": {
|
|
2124
|
+
"targets": {
|
|
2125
|
+
"dotnet": {
|
|
2126
|
+
"namespace": "Amazon.CDK.AWS.ResilienceHub"
|
|
2127
|
+
},
|
|
2128
|
+
"java": {
|
|
2129
|
+
"package": "software.amazon.awscdk.services.resiliencehub"
|
|
2130
|
+
},
|
|
2131
|
+
"python": {
|
|
2132
|
+
"module": "aws_cdk.aws_resiliencehub"
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
1967
2136
|
"aws-cdk-lib.aws_resourcegroups": {
|
|
1968
2137
|
"targets": {
|
|
1969
2138
|
"dotnet": {
|
|
@@ -2068,6 +2237,19 @@
|
|
|
2068
2237
|
}
|
|
2069
2238
|
}
|
|
2070
2239
|
},
|
|
2240
|
+
"aws-cdk-lib.aws_rum": {
|
|
2241
|
+
"targets": {
|
|
2242
|
+
"dotnet": {
|
|
2243
|
+
"namespace": "Amazon.CDK.AWS.RUM"
|
|
2244
|
+
},
|
|
2245
|
+
"java": {
|
|
2246
|
+
"package": "software.amazon.awscdk.services.rum"
|
|
2247
|
+
},
|
|
2248
|
+
"python": {
|
|
2249
|
+
"module": "aws_cdk.aws_rum"
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2071
2253
|
"aws-cdk-lib.aws_s3": {
|
|
2072
2254
|
"targets": {
|
|
2073
2255
|
"dotnet": {
|
|
@@ -2484,6 +2666,19 @@
|
|
|
2484
2666
|
}
|
|
2485
2667
|
}
|
|
2486
2668
|
},
|
|
2669
|
+
"aws-cdk-lib.aws_wisdom": {
|
|
2670
|
+
"targets": {
|
|
2671
|
+
"dotnet": {
|
|
2672
|
+
"namespace": "Amazon.CDK.AWS.Wisdom"
|
|
2673
|
+
},
|
|
2674
|
+
"java": {
|
|
2675
|
+
"package": "software.amazon.awscdk.services.wisdom"
|
|
2676
|
+
},
|
|
2677
|
+
"python": {
|
|
2678
|
+
"module": "aws_cdk.aws_wisdom"
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2487
2682
|
"aws-cdk-lib.aws_workspaces": {
|
|
2488
2683
|
"targets": {
|
|
2489
2684
|
"dotnet": {
|
|
@@ -2588,6 +2783,19 @@
|
|
|
2588
2783
|
}
|
|
2589
2784
|
}
|
|
2590
2785
|
},
|
|
2786
|
+
"aws-cdk-lib.lambda_layer_node_proxy_agent": {
|
|
2787
|
+
"targets": {
|
|
2788
|
+
"dotnet": {
|
|
2789
|
+
"namespace": "Amazon.CDK.LambdaLayer.NodeProxyAgent"
|
|
2790
|
+
},
|
|
2791
|
+
"java": {
|
|
2792
|
+
"package": "software.amazon.awscdk.lambda.layer.node.proxy.agent"
|
|
2793
|
+
},
|
|
2794
|
+
"python": {
|
|
2795
|
+
"module": "aws_cdk.lambda_layer_node_proxy_agent"
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
},
|
|
2591
2799
|
"aws-cdk-lib.pipelines": {
|
|
2592
2800
|
"targets": {
|
|
2593
2801
|
"dotnet": {
|
|
@@ -2669,7 +2877,7 @@
|
|
|
2669
2877
|
},
|
|
2670
2878
|
"description": "CDK Constructs for Application Load Balancer to AWS Lambda integration",
|
|
2671
2879
|
"homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
|
|
2672
|
-
"jsiiVersion": "1.
|
|
2880
|
+
"jsiiVersion": "1.52.1 (build 5ccc8f6)",
|
|
2673
2881
|
"keywords": [
|
|
2674
2882
|
"aws",
|
|
2675
2883
|
"cdk",
|
|
@@ -2688,7 +2896,7 @@
|
|
|
2688
2896
|
},
|
|
2689
2897
|
"name": "@aws-solutions-constructs/aws-alb-lambda",
|
|
2690
2898
|
"readme": {
|
|
2691
|
-
"markdown": "# aws-
|
|
2899
|
+
"markdown": "# aws-alb-lambda module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n| Python|`aws_solutions_constructs.aws_alb_lambda`|\n| Typescript|`@aws-solutions-constructs/aws-alb-lambda`|\n| Java|`software.amazon.awsconstructs.services.alblambda`|\n\nThis AWS Solutions Construct implements an an Application Load Balancer to an AWS Lambda function\n\nHere is a minimal deployable pattern definition in Typescript:\n\n``` typescript\n\n // Obtain a pre-existing certificate from your account\n const certificate = acm.Certificate.fromCertificateArn(\n scope,\n 'existing-cert',\n \"arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012\"\n );\n const props: AlbToLambdaProps = {\n lambdaFunctionProps: {\n code: lambda.Code.fromAsset(`${__dirname}/lambda`),\n runtime: lambda.Runtime.NODEJS_14_X,\n handler: 'index.handler'\n },\n listenerProps: {\n certificates: [ certificate ]\n },\n publicApi: true\n };\n new AlbToLambda(stack, 'new-construct', props);\n\n```\n\n## Initializer\n\n``` text\nnew AlbToLambda(scope: Construct, id: string, props: AlbToLambdaProps);\n```\n\n_Parameters_\n\n* scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)\n* id `string`\n* props [`AlbToLambdaProps`](#pattern-construct-props)\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n| loadBalancerProps? | [elasticloadbalancingv2.ApplicationLoadBalancerProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationLoadBalancerProps.html) | Optional custom properties for a new loadBalancer. Providing both this and existingLoadBalancer is an error. This cannot specify a VPC, it will use the VPC in existingVpc or the VPC created by the construct. |\n| existingLoadBalancerObj? | [elasticloadbalancingv2.ApplicationLoadBalancer](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationLoadBalancer.html) | Existing Application Load Balancer to incorporate into the construct architecture. Providing both this and loadBalancerProps is an error. The VPC containing this loadBalancer must match the VPC provided in existingVpc. |\n| listenerProps? | [ApplicationListenerProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationListenerProps.html) | Props to define the listener. Must be provided when adding the listener to an ALB (eg - when creating the alb), may not be provided when adding a second target to an already established listener. When provided, must include either a certificate or protocol: HTTP |\n| targetProps? | [ApplicationTargetGroupProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationTargetGroupProps.html) | Optional custom properties for a new target group. While this is a standard attribute of props for ALB constructs, there are few pertinent properties for a Lambda target. |\n| ruleProps? | [AddRuleProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.AddRuleProps.html) | Rules for directing traffic to the target being created. May not be specified for the first listener added to an ALB, and must be specified for the second target added to a listener. Add a second target by instantiating this construct a second time and providing the existingAlb from the first instantiation. |\n| vpcProps? | [ec2.VpcProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.VpcProps.html) | Optional custom properties for a VPC the construct will create. This VPC will be used by the new ALB and any Private Hosted Zone the construct creates (that's why loadBalancerProps and privateHostedZoneProps can't include a VPC). Providing both this and existingVpc is an error. |\n|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|\n|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|Optional user provided props to override the default props for the Lambda function.|\n| existingVpc? | [ec2.IVpc](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.IVpc.html) | An existing VPC in which to deploy the construct. Providing both this and vpcProps is an error. If the client provides an existing load balancer and/or existing Private Hosted Zone, those constructs must exist in this VPC. |\n| logAlbAccessLogs? | boolean| Whether to turn on Access Logs for the Application Load Balancer. Uses an S3 bucket with associated storage costs.Enabling Access Logging is a best practice. default - true |\n| albLoggingBucketProps? | [s3.BucketProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html) | Optional properties to customize the bucket used to store the ALB Access Logs. Supplying this and setting logAccessLogs to false is an error. @default - none |\n| publicApi | boolean | Whether the construct is deploying a private or public API. This has implications for the VPC and ALB. |\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n| vpc | [ec2.IVpc](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.IVpc.html) | The VPC used by the construct (whether created by the construct or providedb by the client) |\n| loadBalancer | [elasticloadbalancingv2.ApplicationLoadBalancer](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationLoadBalancer.html) | The Load Balancer used by the construct (whether created by the construct or provided by the client) |\n|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of the Lambda function used in the pattern.|\n| listener | [`elb.ApplicationListener`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationListener.html) | The listener used by this pattern. |\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Application Load Balancer\n* Creates or configures an Application Load Balancer with:\n * Required listeners\n * New target group with routing rules if appropriate\n\n### AWS Lambda Function\n* Configure limited privilege access IAM role for Lambda function\n* Enable reusing connections with Keep-Alive for NodeJs Lambda function\n* Enable X-Ray Tracing\n* Set Environment Variables\n * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)\n\n## Architecture\n\n\n***\n© Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
|
|
2692
2900
|
},
|
|
2693
2901
|
"repository": {
|
|
2694
2902
|
"directory": "source/patterns/@aws-solutions-constructs/aws-alb-lambda",
|
|
@@ -2726,7 +2934,7 @@
|
|
|
2726
2934
|
"initializer": {
|
|
2727
2935
|
"locationInModule": {
|
|
2728
2936
|
"filename": "lib/index.ts",
|
|
2729
|
-
"line":
|
|
2937
|
+
"line": 124
|
|
2730
2938
|
},
|
|
2731
2939
|
"parameters": [
|
|
2732
2940
|
{
|
|
@@ -2752,7 +2960,7 @@
|
|
|
2752
2960
|
"kind": "class",
|
|
2753
2961
|
"locationInModule": {
|
|
2754
2962
|
"filename": "lib/index.ts",
|
|
2755
|
-
"line":
|
|
2963
|
+
"line": 118
|
|
2756
2964
|
},
|
|
2757
2965
|
"name": "AlbToLambda",
|
|
2758
2966
|
"properties": [
|
|
@@ -2760,7 +2968,7 @@
|
|
|
2760
2968
|
"immutable": true,
|
|
2761
2969
|
"locationInModule": {
|
|
2762
2970
|
"filename": "lib/index.ts",
|
|
2763
|
-
"line":
|
|
2971
|
+
"line": 121
|
|
2764
2972
|
},
|
|
2765
2973
|
"name": "lambdaFunction",
|
|
2766
2974
|
"type": {
|
|
@@ -2771,7 +2979,7 @@
|
|
|
2771
2979
|
"immutable": true,
|
|
2772
2980
|
"locationInModule": {
|
|
2773
2981
|
"filename": "lib/index.ts",
|
|
2774
|
-
"line":
|
|
2982
|
+
"line": 122
|
|
2775
2983
|
},
|
|
2776
2984
|
"name": "listener",
|
|
2777
2985
|
"type": {
|
|
@@ -2782,7 +2990,7 @@
|
|
|
2782
2990
|
"immutable": true,
|
|
2783
2991
|
"locationInModule": {
|
|
2784
2992
|
"filename": "lib/index.ts",
|
|
2785
|
-
"line":
|
|
2993
|
+
"line": 119
|
|
2786
2994
|
},
|
|
2787
2995
|
"name": "loadBalancer",
|
|
2788
2996
|
"type": {
|
|
@@ -2793,7 +3001,7 @@
|
|
|
2793
3001
|
"immutable": true,
|
|
2794
3002
|
"locationInModule": {
|
|
2795
3003
|
"filename": "lib/index.ts",
|
|
2796
|
-
"line":
|
|
3004
|
+
"line": 120
|
|
2797
3005
|
},
|
|
2798
3006
|
"name": "vpc",
|
|
2799
3007
|
"type": {
|
|
@@ -2810,7 +3018,7 @@
|
|
|
2810
3018
|
"kind": "interface",
|
|
2811
3019
|
"locationInModule": {
|
|
2812
3020
|
"filename": "lib/index.ts",
|
|
2813
|
-
"line":
|
|
3021
|
+
"line": 23
|
|
2814
3022
|
},
|
|
2815
3023
|
"name": "AlbToLambdaProps",
|
|
2816
3024
|
"properties": [
|
|
@@ -2824,7 +3032,7 @@
|
|
|
2824
3032
|
"immutable": true,
|
|
2825
3033
|
"locationInModule": {
|
|
2826
3034
|
"filename": "lib/index.ts",
|
|
2827
|
-
"line":
|
|
3035
|
+
"line": 115
|
|
2828
3036
|
},
|
|
2829
3037
|
"name": "publicApi",
|
|
2830
3038
|
"type": {
|
|
@@ -2841,7 +3049,7 @@
|
|
|
2841
3049
|
"immutable": true,
|
|
2842
3050
|
"locationInModule": {
|
|
2843
3051
|
"filename": "lib/index.ts",
|
|
2844
|
-
"line":
|
|
3052
|
+
"line": 109
|
|
2845
3053
|
},
|
|
2846
3054
|
"name": "albLoggingBucketProps",
|
|
2847
3055
|
"optional": true,
|
|
@@ -2858,7 +3066,7 @@
|
|
|
2858
3066
|
"immutable": true,
|
|
2859
3067
|
"locationInModule": {
|
|
2860
3068
|
"filename": "lib/index.ts",
|
|
2861
|
-
"line":
|
|
3069
|
+
"line": 46
|
|
2862
3070
|
},
|
|
2863
3071
|
"name": "existingLambdaObj",
|
|
2864
3072
|
"optional": true,
|
|
@@ -2876,7 +3084,7 @@
|
|
|
2876
3084
|
"immutable": true,
|
|
2877
3085
|
"locationInModule": {
|
|
2878
3086
|
"filename": "lib/index.ts",
|
|
2879
|
-
"line":
|
|
3087
|
+
"line": 39
|
|
2880
3088
|
},
|
|
2881
3089
|
"name": "existingLoadBalancerObj",
|
|
2882
3090
|
"optional": true,
|
|
@@ -2894,7 +3102,7 @@
|
|
|
2894
3102
|
"immutable": true,
|
|
2895
3103
|
"locationInModule": {
|
|
2896
3104
|
"filename": "lib/index.ts",
|
|
2897
|
-
"line":
|
|
3105
|
+
"line": 95
|
|
2898
3106
|
},
|
|
2899
3107
|
"name": "existingVpc",
|
|
2900
3108
|
"optional": true,
|
|
@@ -2911,7 +3119,7 @@
|
|
|
2911
3119
|
"immutable": true,
|
|
2912
3120
|
"locationInModule": {
|
|
2913
3121
|
"filename": "lib/index.ts",
|
|
2914
|
-
"line":
|
|
3122
|
+
"line": 52
|
|
2915
3123
|
},
|
|
2916
3124
|
"name": "lambdaFunctionProps",
|
|
2917
3125
|
"optional": true,
|
|
@@ -2929,7 +3137,7 @@
|
|
|
2929
3137
|
"immutable": true,
|
|
2930
3138
|
"locationInModule": {
|
|
2931
3139
|
"filename": "lib/index.ts",
|
|
2932
|
-
"line":
|
|
3140
|
+
"line": 61
|
|
2933
3141
|
},
|
|
2934
3142
|
"name": "listenerProps",
|
|
2935
3143
|
"optional": true,
|
|
@@ -2947,7 +3155,7 @@
|
|
|
2947
3155
|
"immutable": true,
|
|
2948
3156
|
"locationInModule": {
|
|
2949
3157
|
"filename": "lib/index.ts",
|
|
2950
|
-
"line":
|
|
3158
|
+
"line": 31
|
|
2951
3159
|
},
|
|
2952
3160
|
"name": "loadBalancerProps",
|
|
2953
3161
|
"optional": true,
|
|
@@ -2965,7 +3173,7 @@
|
|
|
2965
3173
|
"immutable": true,
|
|
2966
3174
|
"locationInModule": {
|
|
2967
3175
|
"filename": "lib/index.ts",
|
|
2968
|
-
"line":
|
|
3176
|
+
"line": 102
|
|
2969
3177
|
},
|
|
2970
3178
|
"name": "logAlbAccessLogs",
|
|
2971
3179
|
"optional": true,
|
|
@@ -2983,7 +3191,7 @@
|
|
|
2983
3191
|
"immutable": true,
|
|
2984
3192
|
"locationInModule": {
|
|
2985
3193
|
"filename": "lib/index.ts",
|
|
2986
|
-
"line":
|
|
3194
|
+
"line": 78
|
|
2987
3195
|
},
|
|
2988
3196
|
"name": "ruleProps",
|
|
2989
3197
|
"optional": true,
|
|
@@ -3001,7 +3209,7 @@
|
|
|
3001
3209
|
"immutable": true,
|
|
3002
3210
|
"locationInModule": {
|
|
3003
3211
|
"filename": "lib/index.ts",
|
|
3004
|
-
"line":
|
|
3212
|
+
"line": 69
|
|
3005
3213
|
},
|
|
3006
3214
|
"name": "targetProps",
|
|
3007
3215
|
"optional": true,
|
|
@@ -3019,7 +3227,7 @@
|
|
|
3019
3227
|
"immutable": true,
|
|
3020
3228
|
"locationInModule": {
|
|
3021
3229
|
"filename": "lib/index.ts",
|
|
3022
|
-
"line":
|
|
3230
|
+
"line": 87
|
|
3023
3231
|
},
|
|
3024
3232
|
"name": "vpcProps",
|
|
3025
3233
|
"optional": true,
|
|
@@ -3031,6 +3239,6 @@
|
|
|
3031
3239
|
"symbolId": "lib/index:AlbToLambdaProps"
|
|
3032
3240
|
}
|
|
3033
3241
|
},
|
|
3034
|
-
"version": "2.
|
|
3035
|
-
"fingerprint": "
|
|
3242
|
+
"version": "2.1.0",
|
|
3243
|
+
"fingerprint": "d4WhZWXw6QwEiQQBBsbhC5iHG3nhrmepI5wDbLrX6GA="
|
|
3036
3244
|
}
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# aws-
|
|
1
|
+
# aws-alb-lambda module
|
|
2
2
|
<!--BEGIN STABILITY BANNER-->
|
|
3
3
|
|
|
4
4
|
---
|
|
@@ -37,7 +37,7 @@ Here is a minimal deployable pattern definition in Typescript:
|
|
|
37
37
|
const props: AlbToLambdaProps = {
|
|
38
38
|
lambdaFunctionProps: {
|
|
39
39
|
code: lambda.Code.fromAsset(`${__dirname}/lambda`),
|
|
40
|
-
runtime: lambda.Runtime.
|
|
40
|
+
runtime: lambda.Runtime.NODEJS_14_X,
|
|
41
41
|
handler: 'index.handler'
|
|
42
42
|
},
|
|
43
43
|
listenerProps: {
|
|
@@ -94,7 +94,7 @@ Out of the box implementation of the Construct without any override will set the
|
|
|
94
94
|
### Application Load Balancer
|
|
95
95
|
* Creates or configures an Application Load Balancer with:
|
|
96
96
|
* Required listeners
|
|
97
|
-
* New target group with routing rules if appropriate
|
|
97
|
+
* New target group with routing rules if appropriate
|
|
98
98
|
|
|
99
99
|
### AWS Lambda Function
|
|
100
100
|
* Configure limited privilege access IAM role for Lambda function
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
5
5
|
* with the License. A copy of the License is located at
|
|
@@ -14,7 +14,7 @@ import * as elb from "aws-cdk-lib/aws-elasticloadbalancingv2";
|
|
|
14
14
|
import * as ec2 from "aws-cdk-lib/aws-ec2";
|
|
15
15
|
import * as s3 from "aws-cdk-lib/aws-s3";
|
|
16
16
|
import * as lambda from "aws-cdk-lib/aws-lambda";
|
|
17
|
-
import { Construct } from
|
|
17
|
+
import { Construct } from "constructs";
|
|
18
18
|
export interface AlbToLambdaProps {
|
|
19
19
|
/**
|
|
20
20
|
* Optional custom properties for a new loadBalancer.
|