aws-solutions-constructs.aws-lambda-elasticachememcached 2.41.0__py3-none-any.whl → 2.97.0__py3-none-any.whl

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.
@@ -1,138 +1,9 @@
1
+ r'''
2
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-elasticachememcached/README.adoc)
1
3
  '''
2
- # aws-lambda-elasticachememcached module
4
+ from pkgutil import extend_path
5
+ __path__ = extend_path(__path__, __name__)
3
6
 
4
- <!--BEGIN STABILITY BANNER-->---
5
-
6
-
7
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
8
-
9
- ---
10
- <!--END STABILITY BANNER-->
11
-
12
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
13
- |:-------------|:-------------|
14
-
15
- <div style="height:8px"></div>
16
-
17
- | **Language** | **Package** |
18
- |:-------------|-----------------|
19
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_elasticachememcached`|
20
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-elasticachememcached`|
21
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdaelasticachememcached`|
22
-
23
- ## Overview
24
-
25
- This AWS Solutions Construct implements an AWS Lambda function connected to an Amazon Elasticache Memcached cluster.
26
-
27
- Here is a minimal deployable pattern definition :
28
-
29
- Typescript
30
-
31
- ```python
32
- import { Construct } from 'constructs';
33
- import { Stack, StackProps } from 'aws-cdk-lib';
34
- import { LambdaToElasticachememcached } from '@aws-solutions-constructs/aws-lambda-elasticachememcached';
35
- import * as lambda from 'aws-cdk-lib/aws-lambda';
36
-
37
- new LambdaToElasticachememcached(this, 'LambdaToElasticachememcachedPattern', {
38
- lambdaFunctionProps: {
39
- runtime: lambda.Runtime.NODEJS_16_X,
40
- handler: 'index.handler',
41
- code: lambda.Code.fromAsset(`lambda`)
42
- }
43
- });
44
- ```
45
-
46
- Python
47
-
48
- ```python
49
- from aws_solutions_constructs.aws_lambda_elasticachememcached import LambdaToElasticachememcached
50
- from aws_cdk import (
51
- aws_lambda as _lambda,
52
- Stack
53
- )
54
- from constructs import Construct
55
-
56
- LambdaToElasticachememcached(self, 'LambdaToCachePattern',
57
- lambda_function_props=_lambda.FunctionProps(
58
- code=_lambda.Code.from_asset('lambda'),
59
- runtime=_lambda.Runtime.PYTHON_3_9,
60
- handler='index.handler'
61
- )
62
- )
63
- ```
64
-
65
- Java
66
-
67
- ```java
68
- import software.constructs.Construct;
69
-
70
- import software.amazon.awscdk.Stack;
71
- import software.amazon.awscdk.StackProps;
72
- import software.amazon.awscdk.services.lambda.*;
73
- import software.amazon.awscdk.services.lambda.Runtime;
74
- import software.amazon.awsconstructs.services.lambdaelasticachememcached.*;
75
-
76
- new LambdaToElasticachememcached(this, "LambdaToCachePattern", new LambdaToElasticachememcachedProps.Builder()
77
- .lambdaFunctionProps(new FunctionProps.Builder()
78
- .runtime(Runtime.NODEJS_16_X)
79
- .code(Code.fromAsset("lambda"))
80
- .handler("index.handler")
81
- .build())
82
- .build());
83
- ```
84
-
85
- ## Pattern Construct Props
86
-
87
- | **Name** | **Type** | **Description** |
88
- |:-------------|:----------------|-----------------|
89
- |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.|
90
- |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.|
91
- |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.|
92
- |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 overrriden. |
93
- | cacheEndpointEnvironmentVariableName?| string | Optional Name for the Lambda function environment variable set to the cache endpoint. Default: CACHE_ENDPOINT |
94
- | 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. |
95
- | 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. |
96
-
97
- ## Pattern Properties
98
-
99
- | **Name** | **Type** | **Description** |
100
- |:-------------|:----------------|-----------------|
101
- |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.|
102
- |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.|
103
- | 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. |
104
-
105
- ## Default settings
106
-
107
- Out of the box implementation of the Construct without any override will set the following defaults:
108
-
109
- ### AWS Lambda Function
110
-
111
- * Configure limited privilege access IAM role for Lambda function
112
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
113
- * Enable X-Ray Tracing
114
- * Attached to self referencing security group to grant access to cache
115
- * Set Environment Variables
116
-
117
- * (default) CACHE_ENDPOINT
118
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
119
-
120
- ### Amazon Elasticache Memcached Cluster
121
-
122
- * Creates multi node, cross-az cluster by default
123
-
124
- * 2 cache nodes, type: cache.t3.medium
125
- * Self referencing security group attached to cluster endpoint
126
-
127
- ## Architecture
128
-
129
- ![Architecture Diagram](architecture.png)
130
-
131
- ---
132
-
133
-
134
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
135
- '''
136
7
  import abc
137
8
  import builtins
138
9
  import datetime
@@ -143,7 +14,22 @@ import jsii
143
14
  import publication
144
15
  import typing_extensions
145
16
 
146
- from typeguard import check_type
17
+ import typeguard
18
+ from importlib.metadata import version as _metadata_package_version
19
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
20
+
21
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
22
+ if TYPEGUARD_MAJOR_VERSION <= 2:
23
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
24
+ else:
25
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
26
+ pass
27
+ else:
28
+ if TYPEGUARD_MAJOR_VERSION == 3:
29
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
30
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
31
+ else:
32
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
147
33
 
148
34
  from ._jsii import *
149
35
 
@@ -181,9 +67,9 @@ class LambdaToElasticachememcached(
181
67
  :param cache_endpoint_environment_variable_name: Optional Name for the Lambda function environment variable set to the cache endpoint. Default: - CACHE_ENDPOINT
182
68
  :param cache_props: Optional user provided props to override the default props for the Elasticache cache. Providing both this and ``existingCache`` will cause an error. If you provide this, you must provide the associated VPC in existingVpc. Default: - Default properties are used (core/lib/elasticacahe-defaults.ts)
183
69
  :param existing_cache: Existing instance of Elasticache Cluster object, providing both this and ``cacheProps`` will cause an error. Default: - none
184
- :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
70
+ :param existing_lambda_obj: Optional - instance of an existing Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
185
71
  :param existing_vpc: An existing VPC for the construct to use (construct will NOT create a new VPC in this case). Default: - none
186
- :param lambda_function_props: Optional user provided props to override the default props for the Lambda function. Default: - Default properties are used.
72
+ :param lambda_function_props: Optional - user provided props to override the default props for the Lambda function. Providing both this and ``existingLambdaObj`` is an error. Default: - Default properties are used.
187
73
  :param vpc_props: Properties to override default properties if deployVpc is true. Default: - DefaultIsolatedVpcProps() in vpc-defaults.ts
188
74
 
189
75
  :access: public
@@ -250,9 +136,9 @@ class LambdaToElasticachememcachedProps:
250
136
  :param cache_endpoint_environment_variable_name: Optional Name for the Lambda function environment variable set to the cache endpoint. Default: - CACHE_ENDPOINT
251
137
  :param cache_props: Optional user provided props to override the default props for the Elasticache cache. Providing both this and ``existingCache`` will cause an error. If you provide this, you must provide the associated VPC in existingVpc. Default: - Default properties are used (core/lib/elasticacahe-defaults.ts)
252
138
  :param existing_cache: Existing instance of Elasticache Cluster object, providing both this and ``cacheProps`` will cause an error. Default: - none
253
- :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
139
+ :param existing_lambda_obj: Optional - instance of an existing Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
254
140
  :param existing_vpc: An existing VPC for the construct to use (construct will NOT create a new VPC in this case). Default: - none
255
- :param lambda_function_props: Optional user provided props to override the default props for the Lambda function. Default: - Default properties are used.
141
+ :param lambda_function_props: Optional - user provided props to override the default props for the Lambda function. Providing both this and ``existingLambdaObj`` is an error. Default: - Default properties are used.
256
142
  :param vpc_props: Properties to override default properties if deployVpc is true. Default: - DefaultIsolatedVpcProps() in vpc-defaults.ts
257
143
 
258
144
  :summary: The properties for the LambdaToElasticachememcached class.
@@ -322,7 +208,7 @@ class LambdaToElasticachememcachedProps:
322
208
  def existing_lambda_obj(
323
209
  self,
324
210
  ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
325
- '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
211
+ '''Optional - instance of an existing Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
326
212
 
327
213
  :default: - None
328
214
  '''
@@ -342,7 +228,9 @@ class LambdaToElasticachememcachedProps:
342
228
  def lambda_function_props(
343
229
  self,
344
230
  ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
345
- '''Optional user provided props to override the default props for the Lambda function.
231
+ '''Optional - user provided props to override the default props for the Lambda function.
232
+
233
+ Providing both this and ``existingLambdaObj`` is an error.
346
234
 
347
235
  :default: - Default properties are used.
348
236
  '''
@@ -1,3 +1,6 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
1
4
  import abc
2
5
  import builtins
3
6
  import datetime
@@ -8,7 +11,22 @@ import jsii
8
11
  import publication
9
12
  import typing_extensions
10
13
 
11
- from typeguard import check_type
14
+ import typeguard
15
+ from importlib.metadata import version as _metadata_package_version
16
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
17
+
18
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
19
+ if TYPEGUARD_MAJOR_VERSION <= 2:
20
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
21
+ else:
22
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
23
+ pass
24
+ else:
25
+ if TYPEGUARD_MAJOR_VERSION == 3:
26
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
27
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
28
+ else:
29
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
12
30
 
13
31
  import aws_cdk._jsii
14
32
  import aws_solutions_constructs.core._jsii
@@ -16,9 +34,9 @@ import constructs._jsii
16
34
 
17
35
  __jsii_assembly__ = jsii.JSIIAssembly.load(
18
36
  "@aws-solutions-constructs/aws-lambda-elasticachememcached",
19
- "2.41.0",
37
+ "2.97.0",
20
38
  __name__[0:-6],
21
- "aws-lambda-elasticachememcached@2.41.0.jsii.tgz",
39
+ "aws-lambda-elasticachememcached@2.97.0.jsii.tgz",
22
40
  )
23
41
 
24
42
  __all__ = [
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-elasticachememcached
3
+ Version: 2.97.0
4
+ Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon Elasticache memcached cache.
5
+ Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
+ Author: Amazon Web Services
7
+ License: Apache-2.0
8
+ Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: JavaScript
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Typing :: Typed
17
+ Classifier: License :: OSI Approved
18
+ Requires-Python: ~=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: aws-cdk-lib <3.0.0,>=2.233.0
22
+ Requires-Dist: aws-solutions-constructs.core ==2.97.0
23
+ Requires-Dist: constructs <11.0.0,>=10.0.0
24
+ Requires-Dist: jsii <2.0.0,>=1.119.0
25
+ Requires-Dist: publication >=0.0.3
26
+ Requires-Dist: typeguard <4.3.0,>=2.13.3
27
+
28
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-elasticachememcached/README.adoc)
@@ -0,0 +1,9 @@
1
+ aws_solutions_constructs/aws_lambda_elasticachememcached/__init__.py,sha256=Nm5EhlFCOowECzPZ0xKka55OzPFXkgxLRwTXT63XXbs,16094
2
+ aws_solutions_constructs/aws_lambda_elasticachememcached/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ aws_solutions_constructs/aws_lambda_elasticachememcached/_jsii/__init__.py,sha256=Abwk7h32IzannpRDt6GoRz54aS4Vo45zOlr9YHLqp-c,1557
4
+ aws_solutions_constructs/aws_lambda_elasticachememcached/_jsii/aws-lambda-elasticachememcached@2.97.0.jsii.tgz,sha256=S-Vws0-zj8m5aqfPdmSp2mAHucbe13FzPGVHCbgOv8U,136789
5
+ aws_solutions_constructs_aws_lambda_elasticachememcached-2.97.0.dist-info/LICENSE,sha256=wnT4A3LZDAEpNzcPDh8VCH0i4wjvmLJ86l3A0tCINmw,10279
6
+ aws_solutions_constructs_aws_lambda_elasticachememcached-2.97.0.dist-info/METADATA,sha256=axVkhk145f8ctEFV_PufZi_qIiVeC-Eq3P0JuH-y9Q0,1371
7
+ aws_solutions_constructs_aws_lambda_elasticachememcached-2.97.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
8
+ aws_solutions_constructs_aws_lambda_elasticachememcached-2.97.0.dist-info/top_level.txt,sha256=hi3us_KW7V1ocfOqVsNq1o3w552jCEgu_KsCckqYWsg,25
9
+ aws_solutions_constructs_aws_lambda_elasticachememcached-2.97.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,162 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-lambda-elasticachememcached
3
- Version: 2.41.0
4
- Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon Elasticache memcached cache.
5
- Home-page: https://github.com/awslabs/aws-solutions-constructs.git
6
- Author: Amazon Web Services
7
- License: Apache-2.0
8
- Project-URL: Source, https://github.com/awslabs/aws-solutions-constructs.git
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Programming Language :: JavaScript
12
- Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.7
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Typing :: Typed
19
- Classifier: License :: OSI Approved
20
- Requires-Python: ~=3.7
21
- Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
- Requires-Dist: aws-cdk-lib (<3.0.0,>=2.82.0)
24
- Requires-Dist: aws-solutions-constructs.core (==2.41.0)
25
- Requires-Dist: constructs (<11.0.0,>=10.0.0)
26
- Requires-Dist: jsii (<2.0.0,>=1.82.0)
27
- Requires-Dist: publication (>=0.0.3)
28
- Requires-Dist: typeguard (~=2.13.3)
29
-
30
- # aws-lambda-elasticachememcached module
31
-
32
- <!--BEGIN STABILITY BANNER-->---
33
-
34
-
35
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
36
-
37
- ---
38
- <!--END STABILITY BANNER-->
39
-
40
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
41
- |:-------------|:-------------|
42
-
43
- <div style="height:8px"></div>
44
-
45
- | **Language** | **Package** |
46
- |:-------------|-----------------|
47
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_elasticachememcached`|
48
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-elasticachememcached`|
49
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdaelasticachememcached`|
50
-
51
- ## Overview
52
-
53
- This AWS Solutions Construct implements an AWS Lambda function connected to an Amazon Elasticache Memcached cluster.
54
-
55
- Here is a minimal deployable pattern definition :
56
-
57
- Typescript
58
-
59
- ```python
60
- import { Construct } from 'constructs';
61
- import { Stack, StackProps } from 'aws-cdk-lib';
62
- import { LambdaToElasticachememcached } from '@aws-solutions-constructs/aws-lambda-elasticachememcached';
63
- import * as lambda from 'aws-cdk-lib/aws-lambda';
64
-
65
- new LambdaToElasticachememcached(this, 'LambdaToElasticachememcachedPattern', {
66
- lambdaFunctionProps: {
67
- runtime: lambda.Runtime.NODEJS_16_X,
68
- handler: 'index.handler',
69
- code: lambda.Code.fromAsset(`lambda`)
70
- }
71
- });
72
- ```
73
-
74
- Python
75
-
76
- ```python
77
- from aws_solutions_constructs.aws_lambda_elasticachememcached import LambdaToElasticachememcached
78
- from aws_cdk import (
79
- aws_lambda as _lambda,
80
- Stack
81
- )
82
- from constructs import Construct
83
-
84
- LambdaToElasticachememcached(self, 'LambdaToCachePattern',
85
- lambda_function_props=_lambda.FunctionProps(
86
- code=_lambda.Code.from_asset('lambda'),
87
- runtime=_lambda.Runtime.PYTHON_3_9,
88
- handler='index.handler'
89
- )
90
- )
91
- ```
92
-
93
- Java
94
-
95
- ```java
96
- import software.constructs.Construct;
97
-
98
- import software.amazon.awscdk.Stack;
99
- import software.amazon.awscdk.StackProps;
100
- import software.amazon.awscdk.services.lambda.*;
101
- import software.amazon.awscdk.services.lambda.Runtime;
102
- import software.amazon.awsconstructs.services.lambdaelasticachememcached.*;
103
-
104
- new LambdaToElasticachememcached(this, "LambdaToCachePattern", new LambdaToElasticachememcachedProps.Builder()
105
- .lambdaFunctionProps(new FunctionProps.Builder()
106
- .runtime(Runtime.NODEJS_16_X)
107
- .code(Code.fromAsset("lambda"))
108
- .handler("index.handler")
109
- .build())
110
- .build());
111
- ```
112
-
113
- ## Pattern Construct Props
114
-
115
- | **Name** | **Type** | **Description** |
116
- |:-------------|:----------------|-----------------|
117
- |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.|
118
- |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.|
119
- |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.|
120
- |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 overrriden. |
121
- | cacheEndpointEnvironmentVariableName?| string | Optional Name for the Lambda function environment variable set to the cache endpoint. Default: CACHE_ENDPOINT |
122
- | 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. |
123
- | 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. |
124
-
125
- ## Pattern Properties
126
-
127
- | **Name** | **Type** | **Description** |
128
- |:-------------|:----------------|-----------------|
129
- |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.|
130
- |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.|
131
- | 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. |
132
-
133
- ## Default settings
134
-
135
- Out of the box implementation of the Construct without any override will set the following defaults:
136
-
137
- ### AWS Lambda Function
138
-
139
- * Configure limited privilege access IAM role for Lambda function
140
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
141
- * Enable X-Ray Tracing
142
- * Attached to self referencing security group to grant access to cache
143
- * Set Environment Variables
144
-
145
- * (default) CACHE_ENDPOINT
146
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
147
-
148
- ### Amazon Elasticache Memcached Cluster
149
-
150
- * Creates multi node, cross-az cluster by default
151
-
152
- * 2 cache nodes, type: cache.t3.medium
153
- * Self referencing security group attached to cluster endpoint
154
-
155
- ## Architecture
156
-
157
- ![Architecture Diagram](architecture.png)
158
-
159
- ---
160
-
161
-
162
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,9 +0,0 @@
1
- aws_solutions_constructs/aws_lambda_elasticachememcached/__init__.py,sha256=RviE0tMyK_5k-uVq-QLvDVY1M5znV_3jp4ZAZh6Df74,21399
2
- aws_solutions_constructs/aws_lambda_elasticachememcached/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- aws_solutions_constructs/aws_lambda_elasticachememcached/_jsii/__init__.py,sha256=-NyDnKrQD-PZtGQyH_O0AdnM8JwJ5MR7_76tn963wPs,513
4
- aws_solutions_constructs/aws_lambda_elasticachememcached/_jsii/aws-lambda-elasticachememcached@2.41.0.jsii.tgz,sha256=6hp13D5WRlYar5_nAptwUy5l7gU3L8pvKuEslpdllq4,98108
5
- aws_solutions_constructs.aws_lambda_elasticachememcached-2.41.0.dist-info/LICENSE,sha256=wnT4A3LZDAEpNzcPDh8VCH0i4wjvmLJ86l3A0tCINmw,10279
6
- aws_solutions_constructs.aws_lambda_elasticachememcached-2.41.0.dist-info/METADATA,sha256=TEaiqvKIR2Q9gR5iv6hSb3ef6CRaEQulp-MmnxkPRDA,8058
7
- aws_solutions_constructs.aws_lambda_elasticachememcached-2.41.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
8
- aws_solutions_constructs.aws_lambda_elasticachememcached-2.41.0.dist-info/top_level.txt,sha256=hi3us_KW7V1ocfOqVsNq1o3w552jCEgu_KsCckqYWsg,25
9
- aws_solutions_constructs.aws_lambda_elasticachememcached-2.41.0.dist-info/RECORD,,