@aws-solutions-constructs/aws-lambda-elasticachememcached 2.74.0 → 2.75.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 CHANGED
@@ -8,9 +8,8 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "@aws-cdk/integ-tests-alpha": "2.161.0-alpha.0",
12
- "@aws-solutions-constructs/core": "2.74.0",
13
- "aws-cdk-lib": "^2.161.0",
11
+ "@aws-solutions-constructs/core": "2.75.0",
12
+ "aws-cdk-lib": "^2.163.1",
14
13
  "constructs": "^10.0.0"
15
14
  },
16
15
  "dependencyClosure": {
@@ -122,37 +121,6 @@
122
121
  }
123
122
  }
124
123
  },
125
- "@aws-cdk/integ-tests-alpha": {
126
- "targets": {
127
- "dotnet": {
128
- "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png",
129
- "namespace": "Amazon.CDK.IntegTests.Alpha",
130
- "packageId": "Amazon.CDK.IntegTests.Alpha"
131
- },
132
- "go": {
133
- "moduleName": "github.com/aws/aws-cdk-go",
134
- "packageName": "awscdkintegtestsalpha"
135
- },
136
- "java": {
137
- "maven": {
138
- "artifactId": "cdk-integ-tests-alpha",
139
- "groupId": "software.amazon.awscdk"
140
- },
141
- "package": "software.amazon.awscdk.integtests.alpha"
142
- },
143
- "js": {
144
- "npm": "@aws-cdk/integ-tests-alpha"
145
- },
146
- "python": {
147
- "classifiers": [
148
- "Framework :: AWS CDK",
149
- "Framework :: AWS CDK :: 2"
150
- ],
151
- "distName": "aws-cdk.integ-tests-alpha",
152
- "module": "aws_cdk.integ_tests_alpha"
153
- }
154
- }
155
- },
156
124
  "@aws-solutions-constructs/core": {
157
125
  "targets": {
158
126
  "dotnet": {
@@ -3915,7 +3883,7 @@
3915
3883
  },
3916
3884
  "description": "CDK constructs for defining an interaction between an AWS Lambda function and an Amazon Elasticache memcached cache.",
3917
3885
  "homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
3918
- "jsiiVersion": "5.4.36 (build 0893030)",
3886
+ "jsiiVersion": "5.4.46 (build 1a0b9d7)",
3919
3887
  "keywords": [
3920
3888
  "aws",
3921
3889
  "cdk",
@@ -3934,7 +3902,7 @@
3934
3902
  },
3935
3903
  "name": "@aws-solutions-constructs/aws-lambda-elasticachememcached",
3936
3904
  "readme": {
3937
- "markdown": "# aws-lambda-elasticachememcached 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---\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_lambda_elasticachememcached`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-elasticachememcached`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdaelasticachememcached`|\n\n## Overview\nThis AWS Solutions Construct implements an AWS Lambda function connected to an Amazon Elasticache Memcached cluster.\n\nHere is a minimal deployable pattern definition :\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { LambdaToElasticachememcached } from '@aws-solutions-constructs/aws-lambda-elasticachememcached';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\nnew LambdaToElasticachememcached(this, 'LambdaToElasticachememcachedPattern', {\n lambdaFunctionProps: {\n runtime: lambda.Runtime.NODEJS_16_X,\n handler: 'index.handler',\n code: lambda.Code.fromAsset(`lambda`)\n }\n});\n```\n\nPython\n```python\nfrom aws_solutions_constructs.aws_lambda_elasticachememcached import LambdaToElasticachememcached\nfrom aws_cdk import (\n aws_lambda as _lambda,\n Stack\n)\nfrom constructs import Construct\n\nLambdaToElasticachememcached(self, 'LambdaToCachePattern',\n lambda_function_props=_lambda.FunctionProps(\n code=_lambda.Code.from_asset('lambda'),\n runtime=_lambda.Runtime.PYTHON_3_9,\n handler='index.handler'\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.lambdaelasticachememcached.*;\n\nnew LambdaToElasticachememcached(this, \"LambdaToCachePattern\", new LambdaToElasticachememcachedProps.Builder()\n .lambdaFunctionProps(new FunctionProps.Builder()\n .runtime(Runtime.NODEJS_16_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)|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 optional, existing VPC into which this pattern should be deployed. When deployed in a VPC, the Lambda function will use ENIs in the VPC to access network resources and an Interface Endpoint will be created in the VPC for Amazon Elasticache. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|\n|vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user provided properties to override the default properties for the new VPC. `subnetConfiguration` is set by the pattern, so any values for those properties supplied here will be overridden. |\n| cacheEndpointEnvironmentVariableName?| string | Optional Name for the Lambda function environment variable set to the cache endpoint. Default: CACHE_ENDPOINT |\n| cacheProps? | [`cache.CfnCacheClusterProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnCacheClusterProps.html) | Optional user provided props to override the default props for the Elasticache Cluster. Providing both this and `existingCache` will cause an error. |\n| existingCache? | [`cache.CfnCacheCluster`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnCacheCluster.html#attrconfigurationendpointport) | Existing instance of Elasticache Cluster object, providing both this and `cacheProps` will cause an error. If you provide this, you must provide the associated VPC in existingVpc. |\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 used by the pattern.|\n|vpc |[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on the VPC used by the pattern. This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|\n| cache | [`cache.CfnCacheCluster`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnCacheCluster.html#attrconfigurationendpointport) | The Elasticache Memcached cluster used by the construct. |\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\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* Attached to self referencing security group to grant access to cache\n* Set Environment Variables\n * (default) CACHE_ENDPOINT\n * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)\n\n### Amazon Elasticache Memcached Cluster\n* Creates multi node, cross-az cluster by default\n * 2 cache nodes, type: cache.t3.medium\n* Self referencing security group attached to cluster endpoint\n\n## Architecture\n![Architecture Diagram](architecture.png)\n\n***\n&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
3905
+ "markdown": "# aws-lambda-elasticachememcached 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---\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_lambda_elasticachememcached`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-elasticachememcached`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdaelasticachememcached`|\n\n## Overview\nThis AWS Solutions Construct implements an AWS Lambda function connected to an Amazon Elasticache Memcached cluster.\n\nHere is a minimal deployable pattern definition :\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { LambdaToElasticachememcached } from '@aws-solutions-constructs/aws-lambda-elasticachememcached';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\nnew LambdaToElasticachememcached(this, 'LambdaToElasticachememcachedPattern', {\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_lambda_elasticachememcached import LambdaToElasticachememcached\nfrom aws_cdk import (\n aws_lambda as _lambda,\n Stack\n)\nfrom constructs import Construct\n\nLambdaToElasticachememcached(self, 'LambdaToCachePattern',\n lambda_function_props=_lambda.FunctionProps(\n code=_lambda.Code.from_asset('lambda'),\n runtime=_lambda.Runtime.Python_3_11,\n handler='index.handler'\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.lambdaelasticachememcached.*;\n\nnew LambdaToElasticachememcached(this, \"LambdaToCachePattern\", new LambdaToElasticachememcachedProps.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)|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 optional, existing VPC into which this pattern should be deployed. When deployed in a VPC, the Lambda function will use ENIs in the VPC to access network resources and an Interface Endpoint will be created in the VPC for Amazon Elasticache. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|\n|vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user provided properties to override the default properties for the new VPC. `subnetConfiguration` is set by the pattern, so any values for those properties supplied here will be overridden. |\n| cacheEndpointEnvironmentVariableName?| string | Optional Name for the Lambda function environment variable set to the cache endpoint. Default: CACHE_ENDPOINT |\n| cacheProps? | [`cache.CfnCacheClusterProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnCacheClusterProps.html) | Optional user provided props to override the default props for the Elasticache Cluster. Providing both this and `existingCache` will cause an error. |\n| existingCache? | [`cache.CfnCacheCluster`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnCacheCluster.html#attrconfigurationendpointport) | Existing instance of Elasticache Cluster object, providing both this and `cacheProps` will cause an error. If you provide this, you must provide the associated VPC in existingVpc. |\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 used by the pattern.|\n|vpc |[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on the VPC used by the pattern. This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|\n| cache | [`cache.CfnCacheCluster`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticache.CfnCacheCluster.html#attrconfigurationendpointport) | The Elasticache Memcached cluster used by the construct. |\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\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* Attached to self referencing security group to grant access to cache\n* Set Environment Variables\n * (default) CACHE_ENDPOINT\n * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)\n\n### Amazon Elasticache Memcached Cluster\n* Creates multi node, cross-az cluster by default\n * 2 cache nodes, type: cache.t3.medium\n* Self referencing security group attached to cluster endpoint\n\n## Architecture\n![Architecture Diagram](architecture.png)\n\n***\n&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
3938
3906
  },
3939
3907
  "repository": {
3940
3908
  "directory": "source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached",
@@ -4198,6 +4166,6 @@
4198
4166
  "symbolId": "lib/index:LambdaToElasticachememcachedProps"
4199
4167
  }
4200
4168
  },
4201
- "version": "2.74.0",
4202
- "fingerprint": "hGVP8owI5+vFtB89FgP/K5SyvrUFyGC4QBP8PcMaqXk="
4169
+ "version": "2.75.0",
4170
+ "fingerprint": "LrPPyWzqxii95+A8gjpRjjqzhUMEG6+E90oTiEq2Hnw="
4203
4171
  }
package/README.md CHANGED
@@ -32,7 +32,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
32
32
 
33
33
  new LambdaToElasticachememcached(this, 'LambdaToElasticachememcachedPattern', {
34
34
  lambdaFunctionProps: {
35
- runtime: lambda.Runtime.NODEJS_16_X,
35
+ runtime: lambda.Runtime.NODEJS_20_X,
36
36
  handler: 'index.handler',
37
37
  code: lambda.Code.fromAsset(`lambda`)
38
38
  }
@@ -51,7 +51,7 @@ from constructs import Construct
51
51
  LambdaToElasticachememcached(self, 'LambdaToCachePattern',
52
52
  lambda_function_props=_lambda.FunctionProps(
53
53
  code=_lambda.Code.from_asset('lambda'),
54
- runtime=_lambda.Runtime.PYTHON_3_9,
54
+ runtime=_lambda.Runtime.Python_3_11,
55
55
  handler='index.handler'
56
56
  )
57
57
  )
@@ -69,7 +69,7 @@ import software.amazon.awsconstructs.services.lambdaelasticachememcached.*;
69
69
 
70
70
  new LambdaToElasticachememcached(this, "LambdaToCachePattern", new LambdaToElasticachememcachedProps.Builder()
71
71
  .lambdaFunctionProps(new FunctionProps.Builder()
72
- .runtime(Runtime.NODEJS_16_X)
72
+ .runtime(Runtime.NODEJS_20_X)
73
73
  .code(Code.fromAsset("lambda"))
74
74
  .handler("index.handler")
75
75
  .build())
package/lib/index.js CHANGED
@@ -60,7 +60,7 @@ class LambdaToElasticachememcached extends constructs_1.Construct {
60
60
  }
61
61
  exports.LambdaToElasticachememcached = LambdaToElasticachememcached;
62
62
  _a = JSII_RTTI_SYMBOL_1;
63
- LambdaToElasticachememcached[_a] = { fqn: "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcached", version: "2.74.0" };
63
+ LambdaToElasticachememcached[_a] = { fqn: "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcached", version: "2.75.0" };
64
64
  function AddLambdaEnvironmentVariable(targetFunction, value, defaultName, clientName) {
65
65
  const variableName = clientName || defaultName;
66
66
  targetFunction.addEnvironment(variableName, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-solutions-constructs/aws-lambda-elasticachememcached",
3
- "version": "2.74.0",
3
+ "version": "2.75.0",
4
4
  "description": "CDK constructs for defining an interaction between an AWS Lambda function and an Amazon Elasticache memcached cache.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -53,15 +53,14 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@aws-cdk/integ-tests-alpha": "2.161.0-alpha.0",
57
- "@aws-solutions-constructs/core": "2.74.0",
56
+ "@aws-solutions-constructs/core": "2.75.0",
58
57
  "constructs": "^10.0.0"
59
58
  },
60
59
  "devDependencies": {
61
- "@types/jest": "^27.4.0",
60
+ "@aws-cdk/integ-tests-alpha": "2.163.1-alpha.0",
62
61
  "@types/node": "^10.3.0",
63
62
  "constructs": "^10.0.0",
64
- "aws-cdk-lib": "2.161.0"
63
+ "aws-cdk-lib": "2.163.1"
65
64
  },
66
65
  "jest": {
67
66
  "moduleFileExtensions": [
@@ -78,9 +77,9 @@
78
77
  ]
79
78
  },
80
79
  "peerDependencies": {
81
- "@aws-solutions-constructs/core": "2.74.0",
80
+ "@aws-solutions-constructs/core": "2.75.0",
82
81
  "constructs": "^10.0.0",
83
- "aws-cdk-lib": "^2.161.0"
82
+ "aws-cdk-lib": "^2.163.1"
84
83
  },
85
84
  "keywords": [
86
85
  "aws",
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
5
+ * with the License. A copy of the License is located at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
10
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
11
+ * and limitations under the License.
12
+ */
13
+
1
14
  exports.handler = async function (event) {
2
15
  console.log(`request:${JSON.stringify(event, undefined, 2)}`);
3
16
  return {