@aws-solutions-constructs/aws-apigateway-lambda 2.79.1 → 2.81.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 +68 -50
- package/README.md +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +4 -3
- package/package.json +6 -6
- package/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json +3 -3
- package/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json +24 -35
- package/test/integ.apilam-deployFunction.js.snapshot/apilamdeployFunctionIntegDefaultTestDeployAssert281C111D.assets.json +1 -1
- package/test/integ.apilam-deployFunction.js.snapshot/cdk.out +1 -1
- package/test/integ.apilam-deployFunction.js.snapshot/integ.json +1 -1
- package/test/integ.apilam-deployFunction.js.snapshot/manifest.json +290 -6
- package/test/integ.apilam-deployFunction.js.snapshot/tree.json +1 -927
- package/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json +3 -3
- package/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json +24 -35
- package/test/integ.apilam-existingFunction.js.snapshot/apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets.json +1 -1
- package/test/integ.apilam-existingFunction.js.snapshot/cdk.out +1 -1
- package/test/integ.apilam-existingFunction.js.snapshot/integ.json +1 -1
- package/test/integ.apilam-existingFunction.js.snapshot/manifest.json +290 -6
- package/test/integ.apilam-existingFunction.js.snapshot/tree.json +1 -927
- package/test/integ.apilam-no-usage-plan.d.ts +13 -0
- package/test/integ.apilam-no-usage-plan.js +40 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/apilam-no-usage-plan.assets.json +32 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/apilam-no-usage-plan.template.json +626 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/apilamnousageplanIntegDefaultTestDeployAssertFA088EA5.assets.json +19 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/apilamnousageplanIntegDefaultTestDeployAssertFA088EA5.template.json +36 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/asset.0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f/index.js +21 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/cdk.out +1 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/integ.json +12 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/manifest.json +481 -0
- package/test/integ.apilam-no-usage-plan.js.snapshot/tree.json +1 -0
- package/test/test.apigateway-lambda.test.js +40 -1
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.81.0",
|
|
12
|
+
"aws-cdk-lib": "^2.186.0",
|
|
13
13
|
"constructs": "^10.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencyClosure": {
|
|
@@ -39,32 +39,6 @@
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"@aws-cdk/asset-kubectl-v20": {
|
|
43
|
-
"targets": {
|
|
44
|
-
"dotnet": {
|
|
45
|
-
"namespace": "Amazon.CDK.Asset.KubectlV20",
|
|
46
|
-
"packageId": "Amazon.CDK.Asset.KubectlV20"
|
|
47
|
-
},
|
|
48
|
-
"go": {
|
|
49
|
-
"moduleName": "github.com/cdklabs/awscdk-asset-kubectl-go",
|
|
50
|
-
"packageName": "kubectlv20"
|
|
51
|
-
},
|
|
52
|
-
"java": {
|
|
53
|
-
"maven": {
|
|
54
|
-
"artifactId": "cdk-asset-kubectl-v20",
|
|
55
|
-
"groupId": "software.amazon.awscdk"
|
|
56
|
-
},
|
|
57
|
-
"package": "software.amazon.awscdk.cdk.asset.kubectl.v20"
|
|
58
|
-
},
|
|
59
|
-
"js": {
|
|
60
|
-
"npm": "@aws-cdk/asset-kubectl-v20"
|
|
61
|
-
},
|
|
62
|
-
"python": {
|
|
63
|
-
"distName": "aws-cdk.asset-kubectl-v20",
|
|
64
|
-
"module": "aws_cdk.asset_kubectl_v20"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
42
|
"@aws-cdk/asset-node-proxy-agent-v6": {
|
|
69
43
|
"targets": {
|
|
70
44
|
"dotnet": {
|
|
@@ -993,6 +967,19 @@
|
|
|
993
967
|
}
|
|
994
968
|
}
|
|
995
969
|
},
|
|
970
|
+
"aws-cdk-lib.aws_cognito_identitypool": {
|
|
971
|
+
"targets": {
|
|
972
|
+
"dotnet": {
|
|
973
|
+
"namespace": "Amazon.CDK.AWS.Cognito.Identitypool"
|
|
974
|
+
},
|
|
975
|
+
"java": {
|
|
976
|
+
"package": "software.amazon.awscdk.services.cognito.identitypool"
|
|
977
|
+
},
|
|
978
|
+
"python": {
|
|
979
|
+
"module": "aws_cdk.aws_cognito_identitypool"
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
},
|
|
996
983
|
"aws-cdk-lib.aws_comprehend": {
|
|
997
984
|
"targets": {
|
|
998
985
|
"dotnet": {
|
|
@@ -1669,6 +1656,19 @@
|
|
|
1669
1656
|
}
|
|
1670
1657
|
}
|
|
1671
1658
|
},
|
|
1659
|
+
"aws-cdk-lib.aws_gameliftstreams": {
|
|
1660
|
+
"targets": {
|
|
1661
|
+
"dotnet": {
|
|
1662
|
+
"package": "Amazon.CDK.AWS.GameLiftStreams"
|
|
1663
|
+
},
|
|
1664
|
+
"java": {
|
|
1665
|
+
"package": "software.amazon.awscdk.services.gameliftstreams"
|
|
1666
|
+
},
|
|
1667
|
+
"python": {
|
|
1668
|
+
"module": "aws_cdk.aws_gameliftstreams"
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
1672
|
"aws-cdk-lib.aws_globalaccelerator": {
|
|
1673
1673
|
"targets": {
|
|
1674
1674
|
"dotnet": {
|
|
@@ -3294,6 +3294,19 @@
|
|
|
3294
3294
|
}
|
|
3295
3295
|
}
|
|
3296
3296
|
},
|
|
3297
|
+
"aws-cdk-lib.aws_scheduler_targets": {
|
|
3298
|
+
"targets": {
|
|
3299
|
+
"dotnet": {
|
|
3300
|
+
"namespace": "Amazon.CDK.AWS.Scheduler.Targets"
|
|
3301
|
+
},
|
|
3302
|
+
"java": {
|
|
3303
|
+
"package": "software.amazon.awscdk.services.scheduler.targets"
|
|
3304
|
+
},
|
|
3305
|
+
"python": {
|
|
3306
|
+
"module": "aws_cdk.aws_scheduler_targets"
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
},
|
|
3297
3310
|
"aws-cdk-lib.aws_sdb": {
|
|
3298
3311
|
"targets": {
|
|
3299
3312
|
"dotnet": {
|
|
@@ -3841,19 +3854,6 @@
|
|
|
3841
3854
|
}
|
|
3842
3855
|
}
|
|
3843
3856
|
},
|
|
3844
|
-
"aws-cdk-lib.lambda_layer_kubectl": {
|
|
3845
|
-
"targets": {
|
|
3846
|
-
"dotnet": {
|
|
3847
|
-
"namespace": "Amazon.CDK.LambdaLayer.Kubectl"
|
|
3848
|
-
},
|
|
3849
|
-
"java": {
|
|
3850
|
-
"package": "software.amazon.awscdk.lambdalayer.kubectl"
|
|
3851
|
-
},
|
|
3852
|
-
"python": {
|
|
3853
|
-
"module": "aws_cdk.lambda_layer_kubectl"
|
|
3854
|
-
}
|
|
3855
|
-
}
|
|
3856
|
-
},
|
|
3857
3857
|
"aws-cdk-lib.lambda_layer_node_proxy_agent": {
|
|
3858
3858
|
"targets": {
|
|
3859
3859
|
"dotnet": {
|
|
@@ -3980,7 +3980,7 @@
|
|
|
3980
3980
|
},
|
|
3981
3981
|
"name": "@aws-solutions-constructs/aws-apigateway-lambda",
|
|
3982
3982
|
"readme": {
|
|
3983
|
-
"markdown": "# aws-apigateway-lambda module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\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_apigateway_lambda`|\n| Typescript|`@aws-solutions-constructs/aws-apigateway-lambda`|\n| Java|`software.amazon.awsconstructs.services.apigatewaylambda`|\n\n## Overview\n\nThis AWS Solutions Construct implements an Amazon API Gateway REST API connected to an AWS Lambda function pattern.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { ApiGatewayToLambda } from '@aws-solutions-constructs/aws-apigateway-lambda';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\nnew ApiGatewayToLambda(this, 'ApiGatewayToLambdaPattern', {\n lambdaFunctionProps: {\n runtime: lambda.Runtime.NODEJS_20_X,\n handler: 'index.handler',\n code: lambda.Code.fromAsset(`lambda`)\n }\n});\n```\n\nPython\n``` python\nfrom aws_solutions_constructs.aws_apigateway_lambda import ApiGatewayToLambda\nfrom aws_cdk import (\n aws_lambda as _lambda,\n Stack\n)\nfrom constructs import Construct\n\nApiGatewayToLambda(self, 'ApiGatewayToLambdaPattern',\n lambda_function_props=_lambda.FunctionProps(\n runtime=_lambda.Runtime.PYTHON_3_11,\n handler='index.handler',\n code=_lambda.Code.from_asset('lambda')\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.apigatewaylambda.*;\n\nnew ApiGatewayToLambda(this, \"ApiGatewayToLambdaPattern\", new ApiGatewayToLambdaProps.Builder()\n .lambdaFunctionProps(new FunctionProps.Builder()\n .runtime(Runtime.NODEJS_20_X)\n .code(Code.fromAsset(\"lambda\"))\n .handler(\"index.handler\")\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)|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.LambdaRestApi.html)|Optional user-provided props to override the default props for the API.|\n|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\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|apiGateway|[`api.LambdaRestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.LambdaRestApi.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\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon API Gateway\n* Deploy an edge-optimized 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 IAM\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\n\n***\n© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
|
|
3983
|
+
"markdown": "# aws-apigateway-lambda module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\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_apigateway_lambda`|\n| Typescript|`@aws-solutions-constructs/aws-apigateway-lambda`|\n| Java|`software.amazon.awsconstructs.services.apigatewaylambda`|\n\n## Overview\n\nThis AWS Solutions Construct implements an Amazon API Gateway REST API connected to an AWS Lambda function pattern.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { ApiGatewayToLambda } from '@aws-solutions-constructs/aws-apigateway-lambda';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\nnew ApiGatewayToLambda(this, 'ApiGatewayToLambdaPattern', {\n lambdaFunctionProps: {\n runtime: lambda.Runtime.NODEJS_20_X,\n handler: 'index.handler',\n code: lambda.Code.fromAsset(`lambda`)\n }\n});\n```\n\nPython\n``` python\nfrom aws_solutions_constructs.aws_apigateway_lambda import ApiGatewayToLambda\nfrom aws_cdk import (\n aws_lambda as _lambda,\n Stack\n)\nfrom constructs import Construct\n\nApiGatewayToLambda(self, 'ApiGatewayToLambdaPattern',\n lambda_function_props=_lambda.FunctionProps(\n runtime=_lambda.Runtime.PYTHON_3_11,\n handler='index.handler',\n code=_lambda.Code.from_asset('lambda')\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.apigatewaylambda.*;\n\nnew ApiGatewayToLambda(this, \"ApiGatewayToLambdaPattern\", new ApiGatewayToLambdaProps.Builder()\n .lambdaFunctionProps(new FunctionProps.Builder()\n .runtime(Runtime.NODEJS_20_X)\n .code(Code.fromAsset(\"lambda\"))\n .handler(\"index.handler\")\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)|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.LambdaRestApi.html)|Optional user-provided props to override the default props for the API.|\n|createUsagePlan?|boolean|Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true. @default - true (to match legacy behavior)|\n|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\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|apiGateway|[`api.LambdaRestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.LambdaRestApi.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\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon API Gateway\n* Deploy an edge-optimized 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 IAM\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\n\n***\n© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
|
|
3984
3984
|
},
|
|
3985
3985
|
"repository": {
|
|
3986
3986
|
"directory": "source/patterns/@aws-solutions-constructs/aws-apigateway-lambda",
|
|
@@ -4030,7 +4030,7 @@
|
|
|
4030
4030
|
},
|
|
4031
4031
|
"locationInModule": {
|
|
4032
4032
|
"filename": "lib/index.ts",
|
|
4033
|
-
"line":
|
|
4033
|
+
"line": 77
|
|
4034
4034
|
},
|
|
4035
4035
|
"parameters": [
|
|
4036
4036
|
{
|
|
@@ -4065,7 +4065,7 @@
|
|
|
4065
4065
|
"kind": "class",
|
|
4066
4066
|
"locationInModule": {
|
|
4067
4067
|
"filename": "lib/index.ts",
|
|
4068
|
-
"line":
|
|
4068
|
+
"line": 63
|
|
4069
4069
|
},
|
|
4070
4070
|
"name": "ApiGatewayToLambda",
|
|
4071
4071
|
"properties": [
|
|
@@ -4073,7 +4073,7 @@
|
|
|
4073
4073
|
"immutable": true,
|
|
4074
4074
|
"locationInModule": {
|
|
4075
4075
|
"filename": "lib/index.ts",
|
|
4076
|
-
"line":
|
|
4076
|
+
"line": 64
|
|
4077
4077
|
},
|
|
4078
4078
|
"name": "apiGateway",
|
|
4079
4079
|
"type": {
|
|
@@ -4084,7 +4084,7 @@
|
|
|
4084
4084
|
"immutable": true,
|
|
4085
4085
|
"locationInModule": {
|
|
4086
4086
|
"filename": "lib/index.ts",
|
|
4087
|
-
"line":
|
|
4087
|
+
"line": 66
|
|
4088
4088
|
},
|
|
4089
4089
|
"name": "apiGatewayLogGroup",
|
|
4090
4090
|
"type": {
|
|
@@ -4095,7 +4095,7 @@
|
|
|
4095
4095
|
"immutable": true,
|
|
4096
4096
|
"locationInModule": {
|
|
4097
4097
|
"filename": "lib/index.ts",
|
|
4098
|
-
"line":
|
|
4098
|
+
"line": 67
|
|
4099
4099
|
},
|
|
4100
4100
|
"name": "lambdaFunction",
|
|
4101
4101
|
"type": {
|
|
@@ -4106,7 +4106,7 @@
|
|
|
4106
4106
|
"immutable": true,
|
|
4107
4107
|
"locationInModule": {
|
|
4108
4108
|
"filename": "lib/index.ts",
|
|
4109
|
-
"line":
|
|
4109
|
+
"line": 65
|
|
4110
4110
|
},
|
|
4111
4111
|
"name": "apiGatewayCloudWatchRole",
|
|
4112
4112
|
"optional": true,
|
|
@@ -4148,6 +4148,24 @@
|
|
|
4148
4148
|
"primitive": "any"
|
|
4149
4149
|
}
|
|
4150
4150
|
},
|
|
4151
|
+
{
|
|
4152
|
+
"abstract": true,
|
|
4153
|
+
"docs": {
|
|
4154
|
+
"default": "- true (to match legacy behavior)",
|
|
4155
|
+
"remarks": "Must be true if\napiGatewayProps.defaultMethodOptions.apiKeyRequired is true",
|
|
4156
|
+
"summary": "Whether to create a Usage Plan attached to the API."
|
|
4157
|
+
},
|
|
4158
|
+
"immutable": true,
|
|
4159
|
+
"locationInModule": {
|
|
4160
|
+
"filename": "lib/index.ts",
|
|
4161
|
+
"line": 57
|
|
4162
|
+
},
|
|
4163
|
+
"name": "createUsagePlan",
|
|
4164
|
+
"optional": true,
|
|
4165
|
+
"type": {
|
|
4166
|
+
"primitive": "boolean"
|
|
4167
|
+
}
|
|
4168
|
+
},
|
|
4151
4169
|
{
|
|
4152
4170
|
"abstract": true,
|
|
4153
4171
|
"docs": {
|
|
@@ -4203,6 +4221,6 @@
|
|
|
4203
4221
|
"symbolId": "lib/index:ApiGatewayToLambdaProps"
|
|
4204
4222
|
}
|
|
4205
4223
|
},
|
|
4206
|
-
"version": "2.
|
|
4207
|
-
"fingerprint": "
|
|
4224
|
+
"version": "2.81.0",
|
|
4225
|
+
"fingerprint": "JvKPV5YhcUIm1sdVmdJwniRpZk4eUW88HUMdAhgYuuY="
|
|
4208
4226
|
}
|
package/README.md
CHANGED
|
@@ -85,6 +85,7 @@ new ApiGatewayToLambda(this, "ApiGatewayToLambdaPattern", new ApiGatewayToLambda
|
|
|
85
85
|
|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.|
|
|
86
86
|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|
|
87
87
|
|apiGatewayProps?|[`api.LambdaRestApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.LambdaRestApi.html)|Optional user-provided props to override the default props for the API.|
|
|
88
|
+
|createUsagePlan?|boolean|Whether to create a Usage Plan attached to the API. Must be true if apiGatewayProps.defaultMethodOptions.apiKeyRequired is true. @default - true (to match legacy behavior)|
|
|
88
89
|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|
|
89
90
|
|
|
90
91
|
## Pattern Properties
|
package/lib/index.d.ts
CHANGED
|
@@ -43,6 +43,13 @@ export interface ApiGatewayToLambdaProps {
|
|
|
43
43
|
* @default - Default props are used
|
|
44
44
|
*/
|
|
45
45
|
readonly logGroupProps?: logs.LogGroupProps;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to create a Usage Plan attached to the API. Must be true if
|
|
48
|
+
* apiGatewayProps.defaultMethodOptions.apiKeyRequired is true
|
|
49
|
+
*
|
|
50
|
+
* @default - true (to match legacy behavior)
|
|
51
|
+
*/
|
|
52
|
+
readonly createUsagePlan?: boolean;
|
|
46
53
|
}
|
|
47
54
|
/**
|
|
48
55
|
* @summary The ApiGatewayToLambda class.
|
package/lib/index.js
CHANGED
|
@@ -21,13 +21,14 @@ class ApiGatewayToLambda extends constructs_1.Construct {
|
|
|
21
21
|
constructor(scope, id, props) {
|
|
22
22
|
super(scope, id);
|
|
23
23
|
defaults.CheckLambdaProps(props);
|
|
24
|
+
defaults.CheckApiProps(props);
|
|
24
25
|
// Setup the Lambda function
|
|
25
26
|
this.lambdaFunction = defaults.buildLambdaFunction(this, {
|
|
26
27
|
existingLambdaObj: props.existingLambdaObj,
|
|
27
28
|
lambdaFunctionProps: props.lambdaFunctionProps
|
|
28
29
|
});
|
|
29
30
|
// Setup the API Gateway
|
|
30
|
-
const globalRestApiResponse = defaults.GlobalLambdaRestApi(this, this.lambdaFunction, props.apiGatewayProps, props.logGroupProps);
|
|
31
|
+
const globalRestApiResponse = defaults.GlobalLambdaRestApi(this, this.lambdaFunction, props.apiGatewayProps, props.logGroupProps, props.createUsagePlan);
|
|
31
32
|
this.apiGateway = globalRestApiResponse.api;
|
|
32
33
|
this.apiGatewayCloudWatchRole = globalRestApiResponse.role;
|
|
33
34
|
this.apiGatewayLogGroup = globalRestApiResponse.group;
|
|
@@ -35,5 +36,5 @@ class ApiGatewayToLambda extends constructs_1.Construct {
|
|
|
35
36
|
}
|
|
36
37
|
exports.ApiGatewayToLambda = ApiGatewayToLambda;
|
|
37
38
|
_a = JSII_RTTI_SYMBOL_1;
|
|
38
|
-
ApiGatewayToLambda[_a] = { fqn: "@aws-solutions-constructs/aws-apigateway-lambda.ApiGatewayToLambda", version: "2.
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
ApiGatewayToLambda[_a] = { fqn: "@aws-solutions-constructs/aws-apigateway-lambda.ApiGatewayToLambda", version: "2.81.0" };
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQWtCQSwyREFBMkQ7QUFDM0Qsd0ZBQXdGO0FBQ3hGLDJDQUF1QztBQXVDdkM7O0dBRUc7QUFDSCxNQUFhLGtCQUFtQixTQUFRLHNCQUFTO0lBTS9DOzs7Ozs7O09BT0c7SUFDSCxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQThCO1FBQ3RFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDakIsUUFBUSxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ2pDLFFBQVEsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLENBQUM7UUFFOUIsNEJBQTRCO1FBQzVCLElBQUksQ0FBQyxjQUFjLEdBQUcsUUFBUSxDQUFDLG1CQUFtQixDQU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YWxSZXN0QXBpUmVzcG9uc2Uucm9sZTtcbiAgICB0aGlzLmFwaUdhdGV3YXlMb2dHcm91cCA9IGdsb2JhbFJlc3RBcGlSZXNwb25zZS5ncm91cDtcbiAgfVxufSJdfQ==
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-solutions-constructs/aws-apigateway-lambda",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.0",
|
|
4
4
|
"description": "CDK constructs for defining an interaction between an API Gateway and a Lambda function.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@aws-solutions-constructs/core": "2.
|
|
57
|
+
"@aws-solutions-constructs/core": "2.81.0",
|
|
58
58
|
"constructs": "^10.0.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@aws-cdk/integ-tests-alpha": "2.
|
|
61
|
+
"@aws-cdk/integ-tests-alpha": "2.186.0-alpha.0",
|
|
62
62
|
"@types/jest": "^27.4.0",
|
|
63
63
|
"@types/node": "^10.3.0",
|
|
64
64
|
"constructs": "^10.0.0",
|
|
65
|
-
"aws-cdk-lib": "2.
|
|
65
|
+
"aws-cdk-lib": "2.186.0"
|
|
66
66
|
},
|
|
67
67
|
"jest": {
|
|
68
68
|
"moduleFileExtensions": [
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@aws-solutions-constructs/core": "2.
|
|
82
|
+
"@aws-solutions-constructs/core": "2.81.0",
|
|
83
83
|
"constructs": "^10.0.0",
|
|
84
|
-
"aws-cdk-lib": "^2.
|
|
84
|
+
"aws-cdk-lib": "^2.186.0"
|
|
85
85
|
},
|
|
86
86
|
"keywords": [
|
|
87
87
|
"aws",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "40.0.0",
|
|
3
3
|
"files": {
|
|
4
4
|
"0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f": {
|
|
5
5
|
"source": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"d3fd2b482d0b490a81cfad6d51bdb1e9fa7b04b0bf7741747d49e1ba8835c4af": {
|
|
18
18
|
"source": {
|
|
19
19
|
"path": "apilam-deployFunction.template.json",
|
|
20
20
|
"packaging": "file"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"destinations": {
|
|
23
23
|
"current_account-current_region": {
|
|
24
24
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
-
"objectKey": "
|
|
25
|
+
"objectKey": "d3fd2b482d0b490a81cfad6d51bdb1e9fa7b04b0bf7741747d49e1ba8835c4af.json",
|
|
26
26
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -63,40 +63,6 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"testapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyA5D0BE32": {
|
|
67
|
-
"Type": "AWS::IAM::Policy",
|
|
68
|
-
"Properties": {
|
|
69
|
-
"PolicyDocument": {
|
|
70
|
-
"Statement": [
|
|
71
|
-
{
|
|
72
|
-
"Action": [
|
|
73
|
-
"xray:PutTelemetryRecords",
|
|
74
|
-
"xray:PutTraceSegments"
|
|
75
|
-
],
|
|
76
|
-
"Effect": "Allow",
|
|
77
|
-
"Resource": "*"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"Version": "2012-10-17"
|
|
81
|
-
},
|
|
82
|
-
"PolicyName": "testapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyA5D0BE32",
|
|
83
|
-
"Roles": [
|
|
84
|
-
{
|
|
85
|
-
"Ref": "testapigatewaylambdaLambdaFunctionServiceRole5CD2E9F7"
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
"Metadata": {
|
|
90
|
-
"cfn_nag": {
|
|
91
|
-
"rules_to_suppress": [
|
|
92
|
-
{
|
|
93
|
-
"id": "W12",
|
|
94
|
-
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
66
|
"testapigatewaylambdaLambdaFunction18FF222F": {
|
|
101
67
|
"Type": "AWS::Lambda::Function",
|
|
102
68
|
"Properties": {
|
|
@@ -124,7 +90,6 @@
|
|
|
124
90
|
}
|
|
125
91
|
},
|
|
126
92
|
"DependsOn": [
|
|
127
|
-
"testapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyA5D0BE32",
|
|
128
93
|
"testapigatewaylambdaLambdaFunctionServiceRole5CD2E9F7"
|
|
129
94
|
],
|
|
130
95
|
"Metadata": {
|
|
@@ -146,6 +111,30 @@
|
|
|
146
111
|
}
|
|
147
112
|
}
|
|
148
113
|
},
|
|
114
|
+
"testapigatewaylambdaLambdaFunctioninlinePolicyAddedToExecutionRole00FEF72FF": {
|
|
115
|
+
"Type": "AWS::IAM::Policy",
|
|
116
|
+
"Properties": {
|
|
117
|
+
"PolicyDocument": {
|
|
118
|
+
"Statement": [
|
|
119
|
+
{
|
|
120
|
+
"Action": [
|
|
121
|
+
"xray:PutTelemetryRecords",
|
|
122
|
+
"xray:PutTraceSegments"
|
|
123
|
+
],
|
|
124
|
+
"Effect": "Allow",
|
|
125
|
+
"Resource": "*"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"Version": "2012-10-17"
|
|
129
|
+
},
|
|
130
|
+
"PolicyName": "testapigatewaylambdaLambdaFunctioninlinePolicyAddedToExecutionRole00FEF72FF",
|
|
131
|
+
"Roles": [
|
|
132
|
+
{
|
|
133
|
+
"Ref": "testapigatewaylambdaLambdaFunctionServiceRole5CD2E9F7"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
},
|
|
149
138
|
"testapigatewaylambdaApiAccessLogGroupEB3253A2": {
|
|
150
139
|
"Type": "AWS::Logs::LogGroup",
|
|
151
140
|
"UpdateReplacePolicy": "Retain",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"40.0.0"}
|