@aws-solutions-constructs/aws-alb-lambda 2.85.1 → 2.85.3

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 CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "@aws-solutions-constructs/core": "2.85.1",
11
+ "@aws-solutions-constructs/core": "2.85.3",
12
12
  "aws-cdk-lib": "^2.193.0",
13
13
  "constructs": "^10.0.0"
14
14
  },
@@ -3993,7 +3993,7 @@
3993
3993
  },
3994
3994
  "name": "@aws-solutions-constructs/aws-alb-lambda",
3995
3995
  "readme": {
3996
- "markdown": "# aws-alb-lambda module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)\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 Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_alb_lambda`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-alb-lambda`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.alblambda`|\n\n## Overview\nThis AWS Solutions Construct implements an an Application Load Balancer to an AWS Lambda function\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { AlbToLambda, AlbToLambdaProps } from '@aws-solutions-constructs/aws-alb-lambda';\nimport * as acm from 'aws-cdk-lib/aws-certificatemanager';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\n// Obtain a pre-existing certificate from your account\nconst certificate = acm.Certificate.fromCertificateArn(\n this,\n 'existing-cert',\n \"arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012\"\n);\n\nconst constructProps: AlbToLambdaProps = {\n lambdaFunctionProps: {\n code: lambda.Code.fromAsset(`lambda`),\n runtime: lambda.Runtime.NODEJS_20_X,\n handler: 'index.handler'\n },\n listenerProps: {\n certificates: [certificate]\n },\n publicApi: true\n};\n\n// Note - all alb constructs turn on ELB logging by default, so require that an environment including account\n// and region be provided when creating the stack\n//\n// new MyStack(app, 'id', {env: {account: '123456789012', region: 'us-east-1' }});\nnew AlbToLambda(this, 'new-construct', constructProps);\n```\n\nPython\n``` python\nfrom aws_solutions_constructs.aws_alb_lambda import AlbToLambda, AlbToLambdaProps\nfrom aws_cdk import (\n aws_certificatemanager as acm,\n aws_lambda as _lambda,\n aws_elasticloadbalancingv2 as alb,\n Stack\n)\nfrom constructs import Construct\n\n# Obtain a pre-existing certificate from your account\ncertificate = acm.Certificate.from_certificate_arn(\n self,\n 'existing-cert',\n \"arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012\"\n)\n\n# Note - all alb constructs turn on ELB logging by default, so require that an environment including account\n# and region be provided when creating the stack\n#\n# MyStack(app, 'id', env=cdk.Environment(account='123456789012', region='us-east-1'))\nAlbToLambda(self, 'new-construct',\n lambda_function_props=_lambda.FunctionProps(\n runtime=_lambda.Runtime.PYTHON_3_11,\n code=_lambda.Code.from_asset('lambda'),\n handler='index.handler',\n ),\n listener_props=alb.BaseApplicationListenerProps(\n certificates=[certificate]\n ),\n public_api=True)\n```\n\nJava\n``` java\nimport software.constructs.Construct;\nimport java.util.List;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awscdk.services.elasticloadbalancingv2.*;\nimport software.amazon.awscdk.services.lambda.*;\nimport software.amazon.awscdk.services.lambda.Runtime;\nimport software.amazon.awsconstructs.services.alblambda.*;\n\n// Obtain a pre-existing certificate from your account\nListenerCertificate listenerCertificate = ListenerCertificate\n .fromArn(\"arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012\");\n\n// Note - all alb constructs turn on ELB logging by default, so require that an environment including account\n// and region be provided when creating the stack\n//\n// new MyStack(app, \"id\", StackProps.builder()\n// .env(Environment.builder()\n// .account(\"123456789012\")\n// .region(\"us-east-1\")\n// .build());\nnew AlbToLambda(this, \"AlbToLambdaPattern\", new AlbToLambdaProps.Builder()\n .lambdaFunctionProps(new FunctionProps.Builder()\n .runtime(Runtime.NODEJS_20_X)\n .code(Code.fromAsset(\"lambda\"))\n .handler(\"index.handler\")\n .build())\n .listenerProps(new BaseApplicationListenerProps.Builder()\n .certificates(List.of(listenerCertificate))\n .build())\n .publicApi(true)\n .build());\n```\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n| loadBalancerProps? | [elasticloadbalancingv2.ApplicationLoadBalancerProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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/v2/docs/aws-cdk-lib.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![Architecture Diagram](architecture.png)\n\n***\n&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
3996
+ "markdown": "Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-alb-lambda/README.adoc)\n"
3997
3997
  },
3998
3998
  "repository": {
3999
3999
  "directory": "source/patterns/@aws-solutions-constructs/aws-alb-lambda",
@@ -4335,6 +4335,6 @@
4335
4335
  "symbolId": "lib/index:AlbToLambdaProps"
4336
4336
  }
4337
4337
  },
4338
- "version": "2.85.1",
4339
- "fingerprint": "c/0E0afVKvQKQRMwN6n+XV1cArNelOl1BNLEy0MMm80="
4338
+ "version": "2.85.3",
4339
+ "fingerprint": "vrYh1h1hvmroKXfJHS7Bx0PljsVBo4rE4FqndsZAfQk="
4340
4340
  }
package/README.adoc ADDED
@@ -0,0 +1,291 @@
1
+ //!!NODE_ROOT <section>
2
+ //== aws-alb-lambda module
3
+
4
+ [.topic]
5
+ = aws-alb-lambda
6
+ :info_doctype: section
7
+ :info_title: aws-alb-lambda
8
+
9
+
10
+ image:https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge[Stability:Experimental]
11
+
12
+ ____
13
+ All classes are under active development and subject to non-backward
14
+ compatible changes or removal in any future version. These are not
15
+ subject to the https://semver.org/[Semantic Versioning] model. This
16
+ means that while you may use them, you may need to update your source
17
+ code when upgrading to a newer version of this package.
18
+ ____
19
+
20
+ [width="100%",cols="<50%,<50%",options="header",]
21
+ |===
22
+ |*Reference Documentation*:
23
+ |https://docs.aws.amazon.com/solutions/latest/constructs/
24
+ |===
25
+
26
+ [width="100%",cols="<46%,54%",options="header",]
27
+ |===
28
+ |*Language* |*Package*
29
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/python32.png[Python
30
+ Logo] Python |`aws_solutions_constructs.aws_alb_lambda`
31
+
32
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png[Typescript
33
+ Logo] Typescript |`@aws-solutions-constructs/aws-alb-lambda`
34
+
35
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/java32.png[Java
36
+ Logo] Java |`software.amazon.awsconstructs.services.alblambda`
37
+ |===
38
+
39
+ == Overview
40
+
41
+ This AWS Solutions Construct implements an an Application Load Balancer
42
+ to an AWS Lambda function
43
+
44
+ Here is a minimal deployable pattern definition:
45
+
46
+ ====
47
+ [role="tablist"]
48
+ Typescript::
49
+ +
50
+ [source,typescript]
51
+ ----
52
+ import { Construct } from 'constructs';
53
+ import { Stack, StackProps } from 'aws-cdk-lib';
54
+ import { AlbToLambda, AlbToLambdaProps } from '@aws-solutions-constructs/aws-alb-lambda';
55
+ import * as acm from 'aws-cdk-lib/aws-certificatemanager';
56
+ import * as lambda from 'aws-cdk-lib/aws-lambda';
57
+
58
+ // Obtain a pre-existing certificate from your account
59
+ const certificate = acm.Certificate.fromCertificateArn(
60
+ this,
61
+ 'existing-cert',
62
+ "arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012"
63
+ );
64
+
65
+ const constructProps: AlbToLambdaProps = {
66
+ lambdaFunctionProps: {
67
+ code: lambda.Code.fromAsset(`lambda`),
68
+ runtime: lambda.Runtime.NODEJS_20_X,
69
+ handler: 'index.handler'
70
+ },
71
+ listenerProps: {
72
+ certificates: [certificate]
73
+ },
74
+ publicApi: true
75
+ };
76
+
77
+ // Note - all alb constructs turn on ELB logging by default, so require that an environment including account
78
+ // and region be provided when creating the stack
79
+ //
80
+ // new MyStack(app, 'id', {env: {account: '123456789012', region: 'us-east-1' }});
81
+ new AlbToLambda(this, 'new-construct', constructProps);
82
+ ----
83
+
84
+ Python::
85
+ +
86
+ [source,python]
87
+ ----
88
+ from aws_solutions_constructs.aws_alb_lambda import AlbToLambda, AlbToLambdaProps
89
+ from aws_cdk import (
90
+ aws_certificatemanager as acm,
91
+ aws_lambda as _lambda,
92
+ aws_elasticloadbalancingv2 as alb,
93
+ Stack
94
+ )
95
+ from constructs import Construct
96
+
97
+ # Obtain a pre-existing certificate from your account
98
+ certificate = acm.Certificate.from_certificate_arn(
99
+ self,
100
+ 'existing-cert',
101
+ "arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012"
102
+ )
103
+
104
+ # Note - all alb constructs turn on ELB logging by default, so require that an environment including account
105
+ # and region be provided when creating the stack
106
+ #
107
+ # MyStack(app, 'id', env=cdk.Environment(account='123456789012', region='us-east-1'))
108
+ AlbToLambda(self, 'new-construct',
109
+ lambda_function_props=_lambda.FunctionProps(
110
+ runtime=_lambda.Runtime.PYTHON_3_11,
111
+ code=_lambda.Code.from_asset('lambda'),
112
+ handler='index.handler',
113
+ ),
114
+ listener_props=alb.BaseApplicationListenerProps(
115
+ certificates=[certificate]
116
+ ),
117
+ public_api=True)
118
+ ----
119
+
120
+ Java::
121
+ +
122
+ [source,java]
123
+ ----
124
+ import software.constructs.Construct;
125
+ import java.util.List;
126
+
127
+ import software.amazon.awscdk.Stack;
128
+ import software.amazon.awscdk.StackProps;
129
+ import software.amazon.awscdk.services.elasticloadbalancingv2.*;
130
+ import software.amazon.awscdk.services.lambda.*;
131
+ import software.amazon.awscdk.services.lambda.Runtime;
132
+ import software.amazon.awsconstructs.services.alblambda.*;
133
+
134
+ // Obtain a pre-existing certificate from your account
135
+ ListenerCertificate listenerCertificate = ListenerCertificate
136
+ .fromArn("arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012");
137
+
138
+ // Note - all alb constructs turn on ELB logging by default, so require that an environment including account
139
+ // and region be provided when creating the stack
140
+ //
141
+ // new MyStack(app, "id", StackProps.builder()
142
+ // .env(Environment.builder()
143
+ // .account("123456789012")
144
+ // .region("us-east-1")
145
+ // .build());
146
+ new AlbToLambda(this, "AlbToLambdaPattern", new AlbToLambdaProps.Builder()
147
+ .lambdaFunctionProps(new FunctionProps.Builder()
148
+ .runtime(Runtime.NODEJS_20_X)
149
+ .code(Code.fromAsset("lambda"))
150
+ .handler("index.handler")
151
+ .build())
152
+ .listenerProps(new BaseApplicationListenerProps.Builder()
153
+ .certificates(List.of(listenerCertificate))
154
+ .build())
155
+ .publicApi(true)
156
+ .build());
157
+ ----
158
+ ====
159
+
160
+ == Pattern Construct Props
161
+
162
+ [width="100%",cols="<30%,<35%,35%",options="header",]
163
+ |===
164
+ |*Name* |*Type* |*Description*
165
+ |loadBalancerProps?
166
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancerProps.html[elasticloadbalancingv2.ApplicationLoadBalancerProps]
167
+ |Optional custom properties for a new loadBalancer. Providing both this
168
+ and existingLoadBalancer is an error. This cannot specify a VPC, it will
169
+ use the VPC in existingVpc or the VPC created by the construct.
170
+
171
+ |existingLoadBalancerObj?
172
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer.html[elasticloadbalancingv2.ApplicationLoadBalancer]
173
+ |Existing Application Load Balancer to incorporate into the construct
174
+ architecture. Providing both this and loadBalancerProps is an error. The
175
+ VPC containing this loadBalancer must match the VPC provided in
176
+ existingVpc.
177
+
178
+ |listenerProps?
179
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListenerProps.html[ApplicationListenerProps]
180
+ |Props to define the listener. Must be provided when adding the listener
181
+ to an ALB (eg - when creating the alb), may not be provided when adding
182
+ a second target to an already established listener. When provided, must
183
+ include either a certificate or protocol: HTTP
184
+
185
+ |targetProps?
186
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroupProps.html[ApplicationTargetGroupProps]
187
+ |Optional custom properties for a new target group. While this is a
188
+ standard attribute of props for ALB constructs, there are few pertinent
189
+ properties for a Lambda target.
190
+
191
+ |ruleProps?
192
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.AddRuleProps.html[AddRuleProps]
193
+ |Rules for directing traffic to the target being created. May not be
194
+ specified for the first listener added to an ALB, and must be specified
195
+ for the second target added to a listener. Add a second target by
196
+ instantiating this construct a second time and providing the existingAlb
197
+ from the first instantiation.
198
+
199
+ |vpcProps?
200
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html[ec2.VpcProps]
201
+ |Optional custom properties for a VPC the construct will create. This
202
+ VPC will be used by the new ALB and any Private Hosted Zone the
203
+ construct creates (that’s why loadBalancerProps and
204
+ privateHostedZoneProps can’t include a VPC). Providing both this and
205
+ existingVpc is an error.
206
+
207
+ |existingLambdaObj?
208
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html[`lambda.Function`]
209
+ |Existing instance of Lambda Function object, providing both this and
210
+ `lambdaFunctionProps` will cause an error.
211
+
212
+ |lambdaFunctionProps?
213
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html[`lambda.FunctionProps`]
214
+ |Optional user provided props to override the default props for the
215
+ Lambda function.
216
+
217
+ |existingVpc?
218
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html[ec2.IVpc]
219
+ |An existing VPC in which to deploy the construct. Providing both this
220
+ and vpcProps is an error. If the client provides an existing load
221
+ balancer and/or existing Private Hosted Zone, those constructs must
222
+ exist in this VPC.
223
+
224
+ |logAlbAccessLogs? |boolean |Whether to turn on Access Logs for the
225
+ Application Load Balancer. Uses an S3 bucket with associated storage
226
+ costs.Enabling Access Logging is a best practice. default - true
227
+
228
+ |albLoggingBucketProps?
229
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html[s3.BucketProps]
230
+ |Optional properties to customize the bucket used to store the ALB
231
+ Access Logs. Supplying this and setting logAccessLogs to false is an
232
+ error. @default - none
233
+
234
+ |publicApi |boolean |Whether the construct is deploying a private or
235
+ public API. This has implications for the VPC and ALB.
236
+ |===
237
+
238
+ == Pattern Properties
239
+
240
+ [width="100%",cols="<30%,<35%,35%",options="header",]
241
+ |===
242
+ |*Name* |*Type* |*Description*
243
+ |vpc
244
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html[ec2.IVpc]
245
+ |The VPC used by the construct (whether created by the construct or
246
+ providedb by the client)
247
+
248
+ |loadBalancer
249
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer.html[elasticloadbalancingv2.ApplicationLoadBalancer]
250
+ |The Load Balancer used by the construct (whether created by the
251
+ construct or provided by the client)
252
+
253
+ |lambdaFunction
254
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html[`lambda.Function`]
255
+ |Returns an instance of the Lambda function used in the pattern.
256
+
257
+ |listener
258
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener.html[`elb.ApplicationListener`]
259
+ |The listener used by this pattern.
260
+ |===
261
+
262
+ == Default settings
263
+
264
+ Out of the box implementation of the Construct without any override will
265
+ set the following defaults:
266
+
267
+ === Application Load Balancer
268
+
269
+ * Creates or configures an Application Load Balancer with:
270
+ ** Required listeners
271
+ ** New target group with routing rules if appropriate
272
+
273
+ === AWS Lambda Function
274
+
275
+ * Configure limited privilege access IAM role for Lambda function
276
+ * Enable reusing connections with Keep-Alive for NodeJs Lambda function
277
+ * Enable X-Ray Tracing
278
+ * Set Environment Variables
279
+ ** AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x
280
+ and higher functions)
281
+
282
+ == Architecture
283
+
284
+
285
+ image::aws-alb-lambda.png["AWS architecture diagram showing Application Load Balancer, Lambda function, S3, and CloudWatch interactions.",scaledwidth=100%]
286
+
287
+ // github block
288
+
289
+ '''''
290
+
291
+ © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
package/README.md CHANGED
@@ -1,181 +1 @@
1
- # aws-alb-lambda module
2
- <!--BEGIN STABILITY BANNER-->
3
-
4
- ---
5
-
6
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
7
-
8
- > All classes are under active development and subject to non-backward compatible changes or removal in any
9
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
10
- > 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.
11
-
12
- ---
13
- <!--END STABILITY BANNER-->
14
-
15
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
16
- |:-------------|:-------------|
17
- <div style="height:8px"></div>
18
-
19
- | **Language** | **Package** |
20
- |:-------------|-----------------|
21
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_alb_lambda`|
22
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-alb-lambda`|
23
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.alblambda`|
24
-
25
- ## Overview
26
- This AWS Solutions Construct implements an an Application Load Balancer to an AWS Lambda function
27
-
28
- Here is a minimal deployable pattern definition:
29
-
30
- Typescript
31
- ``` typescript
32
- import { Construct } from 'constructs';
33
- import { Stack, StackProps } from 'aws-cdk-lib';
34
- import { AlbToLambda, AlbToLambdaProps } from '@aws-solutions-constructs/aws-alb-lambda';
35
- import * as acm from 'aws-cdk-lib/aws-certificatemanager';
36
- import * as lambda from 'aws-cdk-lib/aws-lambda';
37
-
38
- // Obtain a pre-existing certificate from your account
39
- const certificate = acm.Certificate.fromCertificateArn(
40
- this,
41
- 'existing-cert',
42
- "arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012"
43
- );
44
-
45
- const constructProps: AlbToLambdaProps = {
46
- lambdaFunctionProps: {
47
- code: lambda.Code.fromAsset(`lambda`),
48
- runtime: lambda.Runtime.NODEJS_20_X,
49
- handler: 'index.handler'
50
- },
51
- listenerProps: {
52
- certificates: [certificate]
53
- },
54
- publicApi: true
55
- };
56
-
57
- // Note - all alb constructs turn on ELB logging by default, so require that an environment including account
58
- // and region be provided when creating the stack
59
- //
60
- // new MyStack(app, 'id', {env: {account: '123456789012', region: 'us-east-1' }});
61
- new AlbToLambda(this, 'new-construct', constructProps);
62
- ```
63
-
64
- Python
65
- ``` python
66
- from aws_solutions_constructs.aws_alb_lambda import AlbToLambda, AlbToLambdaProps
67
- from aws_cdk import (
68
- aws_certificatemanager as acm,
69
- aws_lambda as _lambda,
70
- aws_elasticloadbalancingv2 as alb,
71
- Stack
72
- )
73
- from constructs import Construct
74
-
75
- # Obtain a pre-existing certificate from your account
76
- certificate = acm.Certificate.from_certificate_arn(
77
- self,
78
- 'existing-cert',
79
- "arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012"
80
- )
81
-
82
- # Note - all alb constructs turn on ELB logging by default, so require that an environment including account
83
- # and region be provided when creating the stack
84
- #
85
- # MyStack(app, 'id', env=cdk.Environment(account='123456789012', region='us-east-1'))
86
- AlbToLambda(self, 'new-construct',
87
- lambda_function_props=_lambda.FunctionProps(
88
- runtime=_lambda.Runtime.PYTHON_3_11,
89
- code=_lambda.Code.from_asset('lambda'),
90
- handler='index.handler',
91
- ),
92
- listener_props=alb.BaseApplicationListenerProps(
93
- certificates=[certificate]
94
- ),
95
- public_api=True)
96
- ```
97
-
98
- Java
99
- ``` java
100
- import software.constructs.Construct;
101
- import java.util.List;
102
-
103
- import software.amazon.awscdk.Stack;
104
- import software.amazon.awscdk.StackProps;
105
- import software.amazon.awscdk.services.elasticloadbalancingv2.*;
106
- import software.amazon.awscdk.services.lambda.*;
107
- import software.amazon.awscdk.services.lambda.Runtime;
108
- import software.amazon.awsconstructs.services.alblambda.*;
109
-
110
- // Obtain a pre-existing certificate from your account
111
- ListenerCertificate listenerCertificate = ListenerCertificate
112
- .fromArn("arn:aws:acm:us-east-1:123456789012:certificate/11112222-3333-1234-1234-123456789012");
113
-
114
- // Note - all alb constructs turn on ELB logging by default, so require that an environment including account
115
- // and region be provided when creating the stack
116
- //
117
- // new MyStack(app, "id", StackProps.builder()
118
- // .env(Environment.builder()
119
- // .account("123456789012")
120
- // .region("us-east-1")
121
- // .build());
122
- new AlbToLambda(this, "AlbToLambdaPattern", new AlbToLambdaProps.Builder()
123
- .lambdaFunctionProps(new FunctionProps.Builder()
124
- .runtime(Runtime.NODEJS_20_X)
125
- .code(Code.fromAsset("lambda"))
126
- .handler("index.handler")
127
- .build())
128
- .listenerProps(new BaseApplicationListenerProps.Builder()
129
- .certificates(List.of(listenerCertificate))
130
- .build())
131
- .publicApi(true)
132
- .build());
133
- ```
134
-
135
- ## Pattern Construct Props
136
-
137
- | **Name** | **Type** | **Description** |
138
- |:-------------|:----------------|-----------------|
139
- | loadBalancerProps? | [elasticloadbalancingv2.ApplicationLoadBalancerProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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. |
140
- | existingLoadBalancerObj? | [elasticloadbalancingv2.ApplicationLoadBalancer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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. |
141
- | listenerProps? | [ApplicationListenerProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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 |
142
- | targetProps? | [ApplicationTargetGroupProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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. |
143
- | ruleProps? | [AddRuleProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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. |
144
- | vpcProps? | [ec2.VpcProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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. |
145
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
146
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user provided props to override the default props for the Lambda function.|
147
- | existingVpc? | [ec2.IVpc](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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. |
148
- | 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 |
149
- | albLoggingBucketProps? | [s3.BucketProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.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 |
150
- | publicApi | boolean | Whether the construct is deploying a private or public API. This has implications for the VPC and ALB. |
151
-
152
- ## Pattern Properties
153
-
154
- | **Name** | **Type** | **Description** |
155
- |:-------------|:----------------|-----------------|
156
- | vpc | [ec2.IVpc](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) | The VPC used by the construct (whether created by the construct or providedb by the client) |
157
- | loadBalancer | [elasticloadbalancingv2.ApplicationLoadBalancer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer.html) | The Load Balancer used by the construct (whether created by the construct or provided by the client) |
158
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function used in the pattern.|
159
- | listener | [`elb.ApplicationListener`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener.html) | The listener used by this pattern. |
160
-
161
- ## Default settings
162
-
163
- Out of the box implementation of the Construct without any override will set the following defaults:
164
-
165
- ### Application Load Balancer
166
- * Creates or configures an Application Load Balancer with:
167
- * Required listeners
168
- * New target group with routing rules if appropriate
169
-
170
- ### AWS Lambda Function
171
- * Configure limited privilege access IAM role for Lambda function
172
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
173
- * Enable X-Ray Tracing
174
- * Set Environment Variables
175
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
176
-
177
- ## Architecture
178
- ![Architecture Diagram](architecture.png)
179
-
180
- ***
181
- &copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-alb-lambda/README.adoc)
package/lib/index.js CHANGED
@@ -61,5 +61,5 @@ class AlbToLambda extends constructs_1.Construct {
61
61
  }
62
62
  exports.AlbToLambda = AlbToLambda;
63
63
  _a = JSII_RTTI_SYMBOL_1;
64
- AlbToLambda[_a] = { fqn: "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", version: "2.85.1" };
64
+ AlbToLambda[_a] = { fqn: "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", version: "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ws-solutions-constructs/aws-alb-lambda",
3
- "version": "2.85.1",
3
+ "version": "2.85.3",
4
4
  "description": "CDK Constructs for Application Load Balancer to AWS Lambda integration",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -22,12 +22,13 @@
22
22
  "test": "jest --coverage",
23
23
  "clean": "tsc -b --clean",
24
24
  "watch": "tsc -b -w",
25
+ "asciidoc": "asciidoctor --failure-level WARNING -o /dev/null README.adoc",
25
26
  "integ": "integ-runner --update-on-failed",
26
27
  "integ-no-clean": "integ-runner --update-on-failed --no-clean",
27
28
  "integ-assert": "integ-runner",
28
29
  "jsii": "jsii",
29
30
  "jsii-pacmak": "jsii-pacmak",
30
- "build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert",
31
+ "build+lint+test": "npm run jsii && npm run lint && npm run asciidoc && npm test && npm run integ-assert",
31
32
  "blt": "npm run build+lint+test",
32
33
  "snapshot-update": "npm run jsii && npm test -- -u && npm run integ-assert"
33
34
  },
@@ -54,13 +55,13 @@
54
55
  }
55
56
  },
56
57
  "dependencies": {
57
- "@aws-solutions-constructs/core": "2.85.1",
58
+ "@aws-solutions-constructs/core": "2.85.3",
58
59
  "constructs": "^10.0.0"
59
60
  },
60
61
  "devDependencies": {
61
62
  "@aws-cdk/integ-tests-alpha": "2.193.0-alpha.0",
62
63
  "@types/jest": "^27.4.0",
63
- "@aws-solutions-constructs/core": "2.85.1",
64
+ "@aws-solutions-constructs/core": "2.85.3",
64
65
  "@types/node": "^10.3.0",
65
66
  "constructs": "^10.0.0",
66
67
  "aws-cdk-lib": "2.193.0"
@@ -80,7 +81,7 @@
80
81
  ]
81
82
  },
82
83
  "peerDependencies": {
83
- "@aws-solutions-constructs/core": "2.85.1",
84
+ "@aws-solutions-constructs/core": "2.85.3",
84
85
  "constructs": "^10.0.0",
85
86
  "aws-cdk-lib": "^2.193.0"
86
87
  },
File without changes