@aws-solutions-constructs/aws-cloudfront-apigateway-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,8 +8,8 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "@aws-solutions-constructs/aws-cloudfront-apigateway": "2.85.1",
12
- "@aws-solutions-constructs/core": "2.85.1",
11
+ "@aws-solutions-constructs/aws-cloudfront-apigateway": "2.85.3",
12
+ "@aws-solutions-constructs/core": "2.85.3",
13
13
  "aws-cdk-lib": "^2.193.0",
14
14
  "constructs": "^10.0.0"
15
15
  },
@@ -4019,7 +4019,7 @@
4019
4019
  },
4020
4020
  "name": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda",
4021
4021
  "readme": {
4022
- "markdown": "# aws-cloudfront-apigateway-lambda module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)\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_cloudfront_apigateway_lambda`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-cloudfront-apigateway-lambda`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.cloudfrontapigatewaylambda`|\n\n## Overview\nThis AWS Solutions Construct implements an AWS CloudFront fronting an Amazon API Gateway Lambda backed REST API.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { CloudFrontToApiGatewayToLambda } from '@aws-solutions-constructs/aws-cloudfront-apigateway-lambda';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\nnew CloudFrontToApiGatewayToLambda(this, 'test-cloudfront-apigateway-lambda', {\n lambdaFunctionProps: {\n code: lambda.Code.fromAsset(`lambda`),\n runtime: lambda.Runtime.NODEJS_20_X,\n handler: 'index.handler'\n },\n apiGatewayProps: {\n defaultMethodOptions: {\n authorizationType: api.AuthorizationType.NONE\n }\n },\n});\n```\n\nPython\n``` python\nfrom aws_solutions_constructs.aws_cloudfront_apigateway_lambda import CloudFrontToApiGatewayToLambda\nfrom aws_cdk import (\n aws_lambda as _lambda,\n aws_apigateway as apigw,\n Stack\n)\nfrom constructs import Construct\n\n CloudFrontToApiGatewayToLambda(\n self, 'CloudFrontApiGatewayToLambda',\n lambda_function_props=_lambda.FunctionProps(\n runtime=_lambda.Runtime.PYTHON_3_11,\n code=_lambda.Code.from_asset('lambda'),\n handler='hello.handler',\n ),\n # NOTE - we use RestApiProps here because the actual type, LambdaRestApiProps requires\n # the handler function which does not yet exist. As RestApiProps is a subset of of LambdaRestApiProps\n # (although does not *extend* that interface) this works fine when the props object reaches the\n # underlying TypeScript code that implements Constructs\n api_gateway_props=apigw.RestApiProps(\n default_method_options=apigw.MethodOptions(\n authorization_type=apigw.AuthorizationType.NONE\n )\n )\n )\n```\n\nJava\n``` java\nimport software.constructs.Construct;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awscdk.services.lambda.*;\nimport software.amazon.awscdk.services.lambda.Runtime;\nimport software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.*;\nimport software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.CloudFrontToApiGatewayToLambdaProps;\n\nnew CloudFrontToApiGatewayToLambda(this, \"ApiGatewayToLambdaPattern\", new CloudFrontToApiGatewayToLambdaProps.Builder()\n .lambdaFunctionProps(new FunctionProps.Builder()\n .runtime(Runtime.NODEJS_20_X) // execution environment\n .code(Code.fromAsset(\"lambda\")) // code loaded from the `lambda` directory (under root, next to `src`)\n .handler(\"hello.handler\") // file is `hello`, function is `handler`\n .build())\n // NOTE - we use RestApiProps here because the actual type, LambdaRestApiProps requires\n // the handler function which does not yet exist. As RestApiProps is a subset of of LambdaRestApiProps\n // (although does not *extend* that interface) this works fine when the props object reaches the\n // underlying TypeScript code that implements Constructs\n .apiGatewayProps(new RestApiProps.Builder()\n .defaultMethodOptions(new MethodOptions.Builder()\n .authorizationType(AuthorizationType.NONE)\n .build())\n .build())\n .build());\n```\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\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|apiGatewayProps?|[`api.LambdaRestApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.LambdaRestApiProps.html)|User provided props to override the default props for the API Gateway. As of release 2.48.0, clients must include this property with `defaultMethodOptions: { authorizationType: string }` specified. See Issue1043 in the github repo https://github.com/awslabs/aws-solutions-constructs/issues/1043 |\n|cloudFrontDistributionProps?|[`cloudfront.DistributionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.DistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|\n|insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|\n| responseHeadersPolicyProps? | [`cloudfront.ResponseHeadersPolicyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicyProps.html) | Optional user provided configuration that cloudfront applies to all http responses. |\n|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|Optional user provided props to override the default props for for the CloudWatchLogs LogGroup.|\n|cloudFrontLoggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html)|Optional user provided props to override the default props for the CloudFront Logging Bucket.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|cloudFrontWebDistribution|[`cloudfront.Distribution`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Distribution.html)|Returns an instance of cloudfront.Distribution created by the construct|\n|cloudFrontFunction?|[`cloudfront.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Function.html)|Returns an instance of the Cloudfront function created by the pattern.|\n|cloudFrontLoggingBucket|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-readme.html)|Returns an instance of the logging bucket for CloudFront Distribution.|\n|apiGateway|[`api.RestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html)|Returns an instance of the API Gateway REST API created by the pattern.|\n|apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|\n|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|\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 created by the pattern.|\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon CloudFront\n* Configure Access logging for CloudFront Distribution\n* Enable automatic injection of best practice HTTP security headers in all responses from CloudFront Distribution\n\n### Amazon API Gateway\n* Deploy a regional API endpoint\n* Enable CloudWatch logging for API Gateway\n* Configure least privilege access IAM role for API Gateway\n* Set the default authorizationType for all API methods to NONE\n* Enable X-Ray Tracing\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"
4022
+ "markdown": "Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-cloudfront-apigateway-lambda/README.adoc)\n"
4023
4023
  },
4024
4024
  "repository": {
4025
4025
  "directory": "source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda",
@@ -4362,6 +4362,6 @@
4362
4362
  "symbolId": "lib/index:CloudFrontToApiGatewayToLambdaProps"
4363
4363
  }
4364
4364
  },
4365
- "version": "2.85.1",
4366
- "fingerprint": "rj9nhTO5ixjCmCFYBQBn+qX3bQArDJQp08lTXZUR5JQ="
4365
+ "version": "2.85.3",
4366
+ "fingerprint": "NJoOmI0gIxr2zvUJjp6/0Ay80NrqPcf4WrGeufexr2Q="
4367
4367
  }
package/README.adoc ADDED
@@ -0,0 +1,250 @@
1
+ //!!NODE_ROOT <section>
2
+ //== aws-cloudfront-apigateway-lambda module
3
+
4
+ [.topic]
5
+ = aws-cloudfront-apigateway-lambda
6
+ :info_doctype: section
7
+ :info_title: aws-cloudfront-apigateway-lambda
8
+
9
+
10
+ image:https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge[Stability:Stable]
11
+
12
+ [width="100%",cols="<50%,<50%",options="header",]
13
+ |===
14
+ |*Reference Documentation*:
15
+ |https://docs.aws.amazon.com/solutions/latest/constructs/
16
+ |===
17
+
18
+ [width="100%",cols="<46%,54%",options="header",]
19
+ |===
20
+ |*Language* |*Package*
21
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/python32.png[Python
22
+ Logo] Python
23
+ |`aws_solutions_constructs.aws_cloudfront_apigateway_lambda`
24
+
25
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png[Typescript
26
+ Logo] Typescript
27
+ |`@aws-solutions-constructs/aws-cloudfront-apigateway-lambda`
28
+
29
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/java32.png[Java
30
+ Logo] Java
31
+ |`software.amazon.awsconstructs.services.cloudfrontapigatewaylambda`
32
+ |===
33
+
34
+ == Overview
35
+
36
+ This AWS Solutions Construct implements an AWS CloudFront fronting an
37
+ Amazon API Gateway Lambda backed REST API.
38
+
39
+ Here is a minimal deployable pattern definition:
40
+
41
+ ====
42
+ [role="tablist"]
43
+ Typescript::
44
+ +
45
+ [source,typescript]
46
+ ----
47
+ import { Construct } from 'constructs';
48
+ import { Stack, StackProps } from 'aws-cdk-lib';
49
+ import { CloudFrontToApiGatewayToLambda } from '@aws-solutions-constructs/aws-cloudfront-apigateway-lambda';
50
+ import * as lambda from 'aws-cdk-lib/aws-lambda';
51
+
52
+ new CloudFrontToApiGatewayToLambda(this, 'test-cloudfront-apigateway-lambda', {
53
+ lambdaFunctionProps: {
54
+ code: lambda.Code.fromAsset(`lambda`),
55
+ runtime: lambda.Runtime.NODEJS_20_X,
56
+ handler: 'index.handler'
57
+ },
58
+ apiGatewayProps: {
59
+ defaultMethodOptions: {
60
+ authorizationType: api.AuthorizationType.NONE
61
+ }
62
+ },
63
+ });
64
+ ----
65
+
66
+ Python::
67
+ +
68
+ [source,python]
69
+ ----
70
+ from aws_solutions_constructs.aws_cloudfront_apigateway_lambda import CloudFrontToApiGatewayToLambda
71
+ from aws_cdk import (
72
+ aws_lambda as _lambda,
73
+ aws_apigateway as apigw,
74
+ Stack
75
+ )
76
+ from constructs import Construct
77
+
78
+ CloudFrontToApiGatewayToLambda(
79
+ self, 'CloudFrontApiGatewayToLambda',
80
+ lambda_function_props=_lambda.FunctionProps(
81
+ runtime=_lambda.Runtime.PYTHON_3_11,
82
+ code=_lambda.Code.from_asset('lambda'),
83
+ handler='hello.handler',
84
+ ),
85
+ # NOTE - we use RestApiProps here because the actual type, LambdaRestApiProps requires
86
+ # the handler function which does not yet exist. As RestApiProps is a subset of of LambdaRestApiProps
87
+ # (although does not *extend* that interface) this works fine when the props object reaches the
88
+ # underlying TypeScript code that implements Constructs
89
+ api_gateway_props=apigw.RestApiProps(
90
+ default_method_options=apigw.MethodOptions(
91
+ authorization_type=apigw.AuthorizationType.NONE
92
+ )
93
+ )
94
+ )
95
+ ----
96
+
97
+ Java::
98
+ +
99
+ [source,java]
100
+ ----
101
+ import software.constructs.Construct;
102
+
103
+ import software.amazon.awscdk.Stack;
104
+ import software.amazon.awscdk.StackProps;
105
+ import software.amazon.awscdk.services.lambda.*;
106
+ import software.amazon.awscdk.services.lambda.Runtime;
107
+ import software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.*;
108
+ import software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.CloudFrontToApiGatewayToLambdaProps;
109
+
110
+ new CloudFrontToApiGatewayToLambda(this, "ApiGatewayToLambdaPattern", new CloudFrontToApiGatewayToLambdaProps.Builder()
111
+ .lambdaFunctionProps(new FunctionProps.Builder()
112
+ .runtime(Runtime.NODEJS_20_X) // execution environment
113
+ .code(Code.fromAsset("lambda")) // code loaded from the `lambda` directory (under root, next to `src`)
114
+ .handler("hello.handler") // file is `hello`, function is `handler`
115
+ .build())
116
+ // NOTE - we use RestApiProps here because the actual type, LambdaRestApiProps requires
117
+ // the handler function which does not yet exist. As RestApiProps is a subset of of LambdaRestApiProps
118
+ // (although does not *extend* that interface) this works fine when the props object reaches the
119
+ // underlying TypeScript code that implements Constructs
120
+ .apiGatewayProps(new RestApiProps.Builder()
121
+ .defaultMethodOptions(new MethodOptions.Builder()
122
+ .authorizationType(AuthorizationType.NONE)
123
+ .build())
124
+ .build())
125
+ .build());
126
+ ----
127
+ ====
128
+
129
+ == Pattern Construct Props
130
+
131
+ [width="100%",cols="<30%,<35%,35%",options="header",]
132
+ |===
133
+ |*Name* |*Type* |*Description*
134
+ |existingLambdaObj?
135
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html[`lambda.Function`]
136
+ |Existing instance of Lambda Function object, providing both this and
137
+ `lambdaFunctionProps` will cause an error.
138
+
139
+ |lambdaFunctionProps?
140
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html[`lambda.FunctionProps`]
141
+ |Optional user provided props to override the default props for the
142
+ Lambda function.
143
+
144
+ |apiGatewayProps?
145
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.LambdaRestApiProps.html[`api.LambdaRestApiProps`]
146
+ |User provided props to override the default props for the API Gateway.
147
+ As of release 2.48.0, clients must include this property with
148
+ `defaultMethodOptions: { authorizationType: string }` specified. See
149
+ Issue1043 in the github repo
150
+ https://github.com/awslabs/aws-solutions-constructs/issues/1043
151
+
152
+ |cloudFrontDistributionProps?
153
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.DistributionProps.html[`cloudfront.DistributionProps`]
154
+ |Optional user provided props to override the default props for
155
+ CloudFront Distribution
156
+
157
+ |insertHttpSecurityHeaders? |`boolean` |Optional user provided props to
158
+ turn on/off the automatic injection of best practice HTTP security
159
+ headers in all responses from CloudFront
160
+
161
+ |responseHeadersPolicyProps?
162
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicyProps.html[`cloudfront.ResponseHeadersPolicyProps`]
163
+ |Optional user provided configuration that cloudfront applies to all
164
+ http responses.
165
+
166
+ |logGroupProps?
167
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html[`logs.LogGroupProps`]
168
+ |Optional user provided props to override the default props for for the
169
+ CloudWatchLogs LogGroup.
170
+
171
+ |cloudFrontLoggingBucketProps?
172
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html[`s3.BucketProps`]
173
+ |Optional user provided props to override the default props for the
174
+ CloudFront Logging Bucket.
175
+ |===
176
+
177
+ == Pattern Properties
178
+
179
+ [width="100%",cols="<30%,<35%,35%",options="header",]
180
+ |===
181
+ |*Name* |*Type* |*Description*
182
+ |cloudFrontWebDistribution
183
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Distribution.html[`cloudfront.Distribution`]
184
+ |Returns an instance of cloudfront.Distribution created by the construct
185
+
186
+ |cloudFrontFunction?
187
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Function.html[`cloudfront.Function`]
188
+ |Returns an instance of the Cloudfront function created by the pattern.
189
+
190
+ |cloudFrontLoggingBucket
191
+ |https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-readme.html[`s3.Bucket`]
192
+ |Returns an instance of the logging bucket for CloudFront Distribution.
193
+
194
+ |apiGateway
195
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html[`api.RestApi`]
196
+ |Returns an instance of the API Gateway REST API created by the pattern.
197
+
198
+ |apiGatewayCloudWatchRole?
199
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html[`iam.Role`]
200
+ |Returns an instance of the iam.Role created by the construct for API
201
+ Gateway for CloudWatch access.
202
+
203
+ |apiGatewayLogGroup
204
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html[`logs.LogGroup`]
205
+ |Returns an instance of the LogGroup created by the construct for API
206
+ Gateway access logging to CloudWatch.
207
+
208
+ |lambdaFunction
209
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html[`lambda.Function`]
210
+ |Returns an instance of the Lambda function created by the pattern.
211
+ |===
212
+
213
+ == Default settings
214
+
215
+ Out of the box implementation of the Construct without any override will
216
+ set the following defaults:
217
+
218
+ === Amazon CloudFront
219
+
220
+ * Configure Access logging for CloudFront Distribution
221
+ * Enable automatic injection of best practice HTTP security headers in
222
+ all responses from CloudFront Distribution
223
+
224
+ === Amazon API Gateway
225
+
226
+ * Deploy a regional API endpoint
227
+ * Enable CloudWatch logging for API Gateway
228
+ * Configure least privilege access IAM role for API Gateway
229
+ * Set the default authorizationType for all API methods to NONE
230
+ * Enable X-Ray Tracing
231
+
232
+ === AWS Lambda Function
233
+
234
+ * Configure limited privilege access IAM role for Lambda function
235
+ * Enable reusing connections with Keep-Alive for NodeJs Lambda function
236
+ * Enable X-Ray Tracing
237
+ * Set Environment Variables
238
+ ** AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x
239
+ and higher functions)
240
+
241
+ == Architecture
242
+
243
+
244
+ image::aws-cloudfront-apigateway-lambda.png["Diagram showing data flow between AWS services including CloudFront, Api Gateway and Lambda",scaledwidth=100%]
245
+
246
+ // github block
247
+
248
+ '''''
249
+
250
+ © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
package/README.md CHANGED
@@ -1,156 +1 @@
1
- # aws-cloudfront-apigateway-lambda module
2
- <!--BEGIN STABILITY BANNER-->
3
-
4
- ---
5
-
6
- ![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
7
-
8
- ---
9
- <!--END STABILITY BANNER-->
10
-
11
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
12
- |:-------------|:-------------|
13
- <div style="height:8px"></div>
14
-
15
- | **Language** | **Package** |
16
- |:-------------|-----------------|
17
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_cloudfront_apigateway_lambda`|
18
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-cloudfront-apigateway-lambda`|
19
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.cloudfrontapigatewaylambda`|
20
-
21
- ## Overview
22
- This AWS Solutions Construct implements an AWS CloudFront fronting an Amazon API Gateway Lambda backed REST API.
23
-
24
- Here is a minimal deployable pattern definition:
25
-
26
- Typescript
27
- ``` typescript
28
- import { Construct } from 'constructs';
29
- import { Stack, StackProps } from 'aws-cdk-lib';
30
- import { CloudFrontToApiGatewayToLambda } from '@aws-solutions-constructs/aws-cloudfront-apigateway-lambda';
31
- import * as lambda from 'aws-cdk-lib/aws-lambda';
32
-
33
- new CloudFrontToApiGatewayToLambda(this, 'test-cloudfront-apigateway-lambda', {
34
- lambdaFunctionProps: {
35
- code: lambda.Code.fromAsset(`lambda`),
36
- runtime: lambda.Runtime.NODEJS_20_X,
37
- handler: 'index.handler'
38
- },
39
- apiGatewayProps: {
40
- defaultMethodOptions: {
41
- authorizationType: api.AuthorizationType.NONE
42
- }
43
- },
44
- });
45
- ```
46
-
47
- Python
48
- ``` python
49
- from aws_solutions_constructs.aws_cloudfront_apigateway_lambda import CloudFrontToApiGatewayToLambda
50
- from aws_cdk import (
51
- aws_lambda as _lambda,
52
- aws_apigateway as apigw,
53
- Stack
54
- )
55
- from constructs import Construct
56
-
57
- CloudFrontToApiGatewayToLambda(
58
- self, 'CloudFrontApiGatewayToLambda',
59
- lambda_function_props=_lambda.FunctionProps(
60
- runtime=_lambda.Runtime.PYTHON_3_11,
61
- code=_lambda.Code.from_asset('lambda'),
62
- handler='hello.handler',
63
- ),
64
- # NOTE - we use RestApiProps here because the actual type, LambdaRestApiProps requires
65
- # the handler function which does not yet exist. As RestApiProps is a subset of of LambdaRestApiProps
66
- # (although does not *extend* that interface) this works fine when the props object reaches the
67
- # underlying TypeScript code that implements Constructs
68
- api_gateway_props=apigw.RestApiProps(
69
- default_method_options=apigw.MethodOptions(
70
- authorization_type=apigw.AuthorizationType.NONE
71
- )
72
- )
73
- )
74
- ```
75
-
76
- Java
77
- ``` java
78
- import software.constructs.Construct;
79
-
80
- import software.amazon.awscdk.Stack;
81
- import software.amazon.awscdk.StackProps;
82
- import software.amazon.awscdk.services.lambda.*;
83
- import software.amazon.awscdk.services.lambda.Runtime;
84
- import software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.*;
85
- import software.amazon.awsconstructs.services.cloudfrontapigatewaylambda.CloudFrontToApiGatewayToLambdaProps;
86
-
87
- new CloudFrontToApiGatewayToLambda(this, "ApiGatewayToLambdaPattern", new CloudFrontToApiGatewayToLambdaProps.Builder()
88
- .lambdaFunctionProps(new FunctionProps.Builder()
89
- .runtime(Runtime.NODEJS_20_X) // execution environment
90
- .code(Code.fromAsset("lambda")) // code loaded from the `lambda` directory (under root, next to `src`)
91
- .handler("hello.handler") // file is `hello`, function is `handler`
92
- .build())
93
- // NOTE - we use RestApiProps here because the actual type, LambdaRestApiProps requires
94
- // the handler function which does not yet exist. As RestApiProps is a subset of of LambdaRestApiProps
95
- // (although does not *extend* that interface) this works fine when the props object reaches the
96
- // underlying TypeScript code that implements Constructs
97
- .apiGatewayProps(new RestApiProps.Builder()
98
- .defaultMethodOptions(new MethodOptions.Builder()
99
- .authorizationType(AuthorizationType.NONE)
100
- .build())
101
- .build())
102
- .build());
103
- ```
104
-
105
- ## Pattern Construct Props
106
-
107
- | **Name** | **Type** | **Description** |
108
- |:-------------|:----------------|-----------------|
109
- |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.|
110
- |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.|
111
- |apiGatewayProps?|[`api.LambdaRestApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.LambdaRestApiProps.html)|User provided props to override the default props for the API Gateway. As of release 2.48.0, clients must include this property with `defaultMethodOptions: { authorizationType: string }` specified. See Issue1043 in the github repo https://github.com/awslabs/aws-solutions-constructs/issues/1043 |
112
- |cloudFrontDistributionProps?|[`cloudfront.DistributionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.DistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|
113
- |insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|
114
- | responseHeadersPolicyProps? | [`cloudfront.ResponseHeadersPolicyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicyProps.html) | Optional user provided configuration that cloudfront applies to all http responses. |
115
- |logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|Optional user provided props to override the default props for for the CloudWatchLogs LogGroup.|
116
- |cloudFrontLoggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html)|Optional user provided props to override the default props for the CloudFront Logging Bucket.|
117
-
118
- ## Pattern Properties
119
-
120
- | **Name** | **Type** | **Description** |
121
- |:-------------|:----------------|-----------------|
122
- |cloudFrontWebDistribution|[`cloudfront.Distribution`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Distribution.html)|Returns an instance of cloudfront.Distribution created by the construct|
123
- |cloudFrontFunction?|[`cloudfront.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Function.html)|Returns an instance of the Cloudfront function created by the pattern.|
124
- |cloudFrontLoggingBucket|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-readme.html)|Returns an instance of the logging bucket for CloudFront Distribution.|
125
- |apiGateway|[`api.RestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html)|Returns an instance of the API Gateway REST API created by the pattern.|
126
- |apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|
127
- |apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|
128
- |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 created by the pattern.|
129
-
130
- ## Default settings
131
-
132
- Out of the box implementation of the Construct without any override will set the following defaults:
133
-
134
- ### Amazon CloudFront
135
- * Configure Access logging for CloudFront Distribution
136
- * Enable automatic injection of best practice HTTP security headers in all responses from CloudFront Distribution
137
-
138
- ### Amazon API Gateway
139
- * Deploy a regional API endpoint
140
- * Enable CloudWatch logging for API Gateway
141
- * Configure least privilege access IAM role for API Gateway
142
- * Set the default authorizationType for all API methods to NONE
143
- * Enable X-Ray Tracing
144
-
145
- ### AWS Lambda Function
146
- * Configure limited privilege access IAM role for Lambda function
147
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
148
- * Enable X-Ray Tracing
149
- * Set Environment Variables
150
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
151
-
152
- ## Architecture
153
- ![Architecture Diagram](architecture.png)
154
-
155
- ***
156
- &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-cloudfront-apigateway-lambda/README.adoc)
package/lib/index.js CHANGED
@@ -57,5 +57,5 @@ class CloudFrontToApiGatewayToLambda extends constructs_1.Construct {
57
57
  }
58
58
  exports.CloudFrontToApiGatewayToLambda = CloudFrontToApiGatewayToLambda;
59
59
  _a = JSII_RTTI_SYMBOL_1;
60
- CloudFrontToApiGatewayToLambda[_a] = { fqn: "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda.CloudFrontToApiGatewayToLambda", version: "2.85.1" };
60
+ CloudFrontToApiGatewayToLambda[_a] = { fqn: "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda.CloudFrontToApiGatewayToLambda", version: "2.85.3" };
61
61
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQW1CQSwyREFBMkQ7QUFDM0Qsd0ZBQXdGO0FBQ3hGLDJDQUF1QztBQUN2QyxtR0FBNkY7QUEyRTdGLE1BQWEsOEJBQStCLFNBQVEsc0JBQVM7SUFTM0Q7Ozs7Ozs7T0FPRztJQUNILFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsS0FBMEM7UUFDbEYsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztRQUNqQixRQUFRLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDakMsUUFBUSxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUU5QixtRkFBbUY7UUFDbkYsSUFBSSxDQUFDLEtBQUssQ0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ucmVzcG9uc2VIZWFkZXJzUG9saWN5UHJvcHNcbiAgICB9KTtcblxuICAgIHRoaXMuY2xvdWRGcm9udFdlYkRpc3RyaWJ1dGlvbiA9IGFwaUNsb3VkZnJvbnQuY2xvdWRGcm9udFdlYkRpc3RyaWJ1dGlvbjtcbiAgICB0aGlzLmNsb3VkRnJvbnRGdW5jdGlvbiA9IGFwaUNsb3VkZnJvbnQuY2xvdWRGcm9udEZ1bmN0aW9uO1xuICAgIHRoaXMuY2xvdWRGcm9udExvZ2dpbmdCdWNrZXQgPSBhcGlDbG91ZGZyb250LmNsb3VkRnJvbnRMb2dnaW5nQnVja2V0O1xuICB9XG59XG4iXX0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda",
3
- "version": "2.85.1",
3
+ "version": "2.85.3",
4
4
  "description": "CDK Constructs for AWS Cloudfront to AWS API Gateway 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,8 +55,8 @@
54
55
  }
55
56
  },
56
57
  "dependencies": {
57
- "@aws-solutions-constructs/aws-cloudfront-apigateway": "2.85.1",
58
- "@aws-solutions-constructs/core": "2.85.1",
58
+ "@aws-solutions-constructs/aws-cloudfront-apigateway": "2.85.3",
59
+ "@aws-solutions-constructs/core": "2.85.3",
59
60
  "constructs": "^10.0.0"
60
61
  },
61
62
  "devDependencies": {
@@ -80,8 +81,8 @@
80
81
  ]
81
82
  },
82
83
  "peerDependencies": {
83
- "@aws-solutions-constructs/core": "2.85.1",
84
- "@aws-solutions-constructs/aws-cloudfront-apigateway": "2.85.1",
84
+ "@aws-solutions-constructs/core": "2.85.3",
85
+ "@aws-solutions-constructs/aws-cloudfront-apigateway": "2.85.3",
85
86
  "constructs": "^10.0.0",
86
87
  "aws-cdk-lib": "^2.193.0"
87
88
  },