aws-solutions-constructs.aws-lambda-sqs-lambda 2.85.2__tar.gz → 2.85.4__tar.gz

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.
Files changed (21) hide show
  1. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4/PKG-INFO +30 -0
  2. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4/README.md +1 -0
  3. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/setup.py +5 -5
  4. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/src/aws_solutions_constructs/aws_lambda_sqs_lambda/__init__.py +1 -159
  5. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/src/aws_solutions_constructs/aws_lambda_sqs_lambda/_jsii/__init__.py +2 -2
  6. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4/src/aws_solutions_constructs/aws_lambda_sqs_lambda/_jsii/aws-lambda-sqs-lambda@2.85.4.jsii.tgz +0 -0
  7. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/PKG-INFO +30 -0
  8. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/SOURCES.txt +1 -1
  9. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/requires.txt +8 -0
  10. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2/PKG-INFO +0 -188
  11. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2/README.md +0 -159
  12. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2/src/aws_solutions_constructs/aws_lambda_sqs_lambda/_jsii/aws-lambda-sqs-lambda@2.85.2.jsii.tgz +0 -0
  13. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/PKG-INFO +0 -188
  14. aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/requires.txt +0 -8
  15. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/LICENSE +0 -0
  16. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/MANIFEST.in +0 -0
  17. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/pyproject.toml +0 -0
  18. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/setup.cfg +0 -0
  19. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/src/aws_solutions_constructs/aws_lambda_sqs_lambda/py.typed +0 -0
  20. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/dependency_links.txt +0 -0
  21. {aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.2 → aws_solutions_constructs_aws_lambda_sqs_lambda-2.85.4}/src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/top_level.txt +0 -0
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-sqs-lambda
3
+ Version: 2.85.4
4
+ Summary: CDK construct that provisions (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
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.193.0
22
+ Requires-Dist: aws-solutions-constructs.aws-lambda-sqs==2.85.4
23
+ Requires-Dist: aws-solutions-constructs.aws-sqs-lambda==2.85.4
24
+ Requires-Dist: aws-solutions-constructs.core==2.85.4
25
+ Requires-Dist: constructs<11.0.0,>=10.0.0
26
+ Requires-Dist: jsii<2.0.0,>=1.111.0
27
+ Requires-Dist: publication>=0.0.3
28
+ Requires-Dist: typeguard<4.3.0,>=2.13.3
29
+
30
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-sqs-lambda/README.adoc)
@@ -0,0 +1 @@
1
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-sqs-lambda/README.adoc)
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "aws-solutions-constructs.aws-lambda-sqs-lambda",
8
- "version": "2.85.2",
8
+ "version": "2.85.4",
9
9
  "description": "CDK construct that provisions (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/awslabs/aws-solutions-constructs.git",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "aws_solutions_constructs.aws_lambda_sqs_lambda._jsii": [
29
- "aws-lambda-sqs-lambda@2.85.2.jsii.tgz"
29
+ "aws-lambda-sqs-lambda@2.85.4.jsii.tgz"
30
30
  ],
31
31
  "aws_solutions_constructs.aws_lambda_sqs_lambda": [
32
32
  "py.typed"
@@ -35,9 +35,9 @@ kwargs = json.loads(
35
35
  "python_requires": "~=3.9",
36
36
  "install_requires": [
37
37
  "aws-cdk-lib>=2.193.0, <3.0.0",
38
- "aws-solutions-constructs.aws-lambda-sqs==2.85.2",
39
- "aws-solutions-constructs.aws-sqs-lambda==2.85.2",
40
- "aws-solutions-constructs.core==2.85.2",
38
+ "aws-solutions-constructs.aws-lambda-sqs==2.85.4",
39
+ "aws-solutions-constructs.aws-sqs-lambda==2.85.4",
40
+ "aws-solutions-constructs.core==2.85.4",
41
41
  "constructs>=10.0.0, <11.0.0",
42
42
  "jsii>=1.111.0, <2.0.0",
43
43
  "publication>=0.0.3",
@@ -1,163 +1,5 @@
1
1
  r'''
2
- # aws-lambda-sqs-lambda module
3
-
4
- <!--BEGIN STABILITY BANNER-->---
5
-
6
-
7
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
8
-
9
- > All classes are under active development and subject to non-backward compatible changes or removal in any
10
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
11
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
12
-
13
- ---
14
- <!--END STABILITY BANNER-->
15
-
16
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
17
- |:-------------|:-------------|
18
-
19
- <div style="height:8px"></div>
20
-
21
- | **Language** | **Package** |
22
- |:-------------|-----------------|
23
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs_lambda`|
24
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs-lambda`|
25
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqslambda`|
26
-
27
- ## Overview
28
-
29
- This AWS Solutions Construct implements (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
30
-
31
- Here is a minimal deployable pattern definition:
32
-
33
- Typescript
34
-
35
- ```python
36
- import { Construct } from 'constructs';
37
- import { Stack, StackProps } from 'aws-cdk-lib';
38
- import { LambdaToSqsToLambda, LambdaToSqsToLambdaProps } from "@aws-solutions-constructs/aws-lambda-sqs-lambda";
39
- import * as lambda from 'aws-cdk-lib/aws-lambda';
40
-
41
- new LambdaToSqsToLambda(this, 'LambdaToSqsToLambdaPattern', {
42
- producerLambdaFunctionProps: {
43
- runtime: lambda.Runtime.NODEJS_20_X,
44
- handler: 'index.handler',
45
- code: lambda.Code.fromAsset(`producer-lambda`)
46
- },
47
- consumerLambdaFunctionProps: {
48
- runtime: lambda.Runtime.NODEJS_20_X,
49
- handler: 'index.handler',
50
- code: lambda.Code.fromAsset(`consumer-lambda`)
51
- }
52
- });
53
- ```
54
-
55
- Python
56
-
57
- ```python
58
- from aws_solutions_constructs.aws_lambda_sqs_lambda import LambdaToSqsToLambda
59
- from aws_cdk import (
60
- aws_lambda as _lambda,
61
- Stack
62
- )
63
- from constructs import Construct
64
-
65
- LambdaToSqsToLambda(
66
- self, 'LambdaToSqsToLambdaPattern',
67
- producer_lambda_function_props=_lambda.FunctionProps(
68
- code=_lambda.Code.from_asset('producer_lambda'),
69
- runtime=_lambda.Runtime.PYTHON_3_11,
70
- handler='index.handler'
71
- ),
72
- consumer_lambda_function_props=_lambda.FunctionProps(
73
- code=_lambda.Code.from_asset('consumer_lambda'),
74
- runtime=_lambda.Runtime.PYTHON_3_11,
75
- handler='index.handler'
76
- )
77
- )
78
- ```
79
-
80
- Java
81
-
82
- ```java
83
- import software.constructs.Construct;
84
-
85
- import software.amazon.awscdk.Stack;
86
- import software.amazon.awscdk.StackProps;
87
- import software.amazon.awscdk.services.lambda.*;
88
- import software.amazon.awscdk.services.lambda.Runtime;
89
- import software.amazon.awsconstructs.services.lambdasqslambda.*;
90
-
91
- new LambdaToSqsToLambda(this, "LambdaToSqsToLambdaPattern", new LambdaToSqsToLambdaProps.Builder()
92
- .producerLambdaFunctionProps(new FunctionProps.Builder()
93
- .runtime(Runtime.NODEJS_20_X)
94
- .code(Code.fromAsset("producer-lambda"))
95
- .handler("index.handler")
96
- .build())
97
- .consumerLambdaFunctionProps(new FunctionProps.Builder()
98
- .runtime(Runtime.NODEJS_20_X)
99
- .code(Code.fromAsset("consumer-lambda"))
100
- .handler("index.handler")
101
- .build())
102
- .build());
103
- ```
104
-
105
- ## Pattern Construct Props
106
-
107
- | **Name** | **Type** | **Description** |
108
- |:-------------|:----------------|-----------------|
109
- |existingProducerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. Providing both this and `producerLambdaFunctionProps` will cause an error. |
110
- |producerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the producer Lambda function. |
111
- |existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|An optional, existing SQS queue to be used instead of the default queue. Providing both this and `queueProps` will cause an error.|
112
- |queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided properties to override the default properties for the SQS queue. Providing both this and `existingQueueObj` will cause an error. |
113
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
114
- |deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the dead letter queue. Only used if the `deployDeadLetterQueue` property is set to `true`.|
115
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
116
- |existingConsumerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. Providing both this and `consumerLambdaFunctionProps` will cause an error. |
117
- |consumerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the consumer Lambda function.|
118
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
119
- |sqsEventSourceProps?| [`SqsEventSourceProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.SqsEventSourceProps.html)|Optional user provided properties for the queue event source.|
120
- |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 SQS. 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.|
121
- |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. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
122
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
123
-
124
- ## Pattern Properties
125
-
126
- | **Name** | **Type** | **Description** |
127
- |:-------------|:----------------|-----------------|
128
- |producerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the producer Lambda function created by the pattern.|
129
- |sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern. |
130
- |deadLetterQueue?|[`sqs.Queue \| undefined`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead letter queue created by the pattern, if one is deployed.|
131
- |consumerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the consumer Lambda function created by the pattern.|
132
- |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 (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|
133
-
134
- ## Default Settings
135
-
136
- Out-of-the-box implementation of this Construct (without any overridden properties) will adhere to the following defaults:
137
-
138
- ### AWS Lambda Functions
139
-
140
- * Configure limited privilege access IAM role for Lambda functions.
141
- * Enable reusing connections with Keep-Alive for NodeJs Lambda functions.
142
- * Enable X-Ray Tracing
143
- * Set Environment Variables
144
-
145
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
146
-
147
- ### Amazon SQS Queue
148
-
149
- * Deploy a dead letter queue for the primary queue.
150
- * Enable server-side encryption for the primary queue using an AWS Managed KMS Key.
151
- * Enforce encryption of data in transit
152
-
153
- ## Architecture
154
-
155
- ![Architecture Diagram](architecture.png)
156
-
157
- ---
158
-
159
-
160
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
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-sqs-lambda/README.adoc)
161
3
  '''
162
4
  from pkgutil import extend_path
163
5
  __path__ = extend_path(__path__, __name__)
@@ -36,9 +36,9 @@ import constructs._jsii
36
36
 
37
37
  __jsii_assembly__ = jsii.JSIIAssembly.load(
38
38
  "@aws-solutions-constructs/aws-lambda-sqs-lambda",
39
- "2.85.2",
39
+ "2.85.4",
40
40
  __name__[0:-6],
41
- "aws-lambda-sqs-lambda@2.85.2.jsii.tgz",
41
+ "aws-lambda-sqs-lambda@2.85.4.jsii.tgz",
42
42
  )
43
43
 
44
44
  __all__ = [
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-sqs-lambda
3
+ Version: 2.85.4
4
+ Summary: CDK construct that provisions (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
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.193.0
22
+ Requires-Dist: aws-solutions-constructs.aws-lambda-sqs==2.85.4
23
+ Requires-Dist: aws-solutions-constructs.aws-sqs-lambda==2.85.4
24
+ Requires-Dist: aws-solutions-constructs.core==2.85.4
25
+ Requires-Dist: constructs<11.0.0,>=10.0.0
26
+ Requires-Dist: jsii<2.0.0,>=1.111.0
27
+ Requires-Dist: publication>=0.0.3
28
+ Requires-Dist: typeguard<4.3.0,>=2.13.3
29
+
30
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-sqs-lambda/README.adoc)
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_lambda_sqs_lambda.egg-info/top_level.txt
11
11
  src/aws_solutions_constructs/aws_lambda_sqs_lambda/__init__.py
12
12
  src/aws_solutions_constructs/aws_lambda_sqs_lambda/py.typed
13
13
  src/aws_solutions_constructs/aws_lambda_sqs_lambda/_jsii/__init__.py
14
- src/aws_solutions_constructs/aws_lambda_sqs_lambda/_jsii/aws-lambda-sqs-lambda@2.85.2.jsii.tgz
14
+ src/aws_solutions_constructs/aws_lambda_sqs_lambda/_jsii/aws-lambda-sqs-lambda@2.85.4.jsii.tgz
@@ -0,0 +1,8 @@
1
+ aws-cdk-lib<3.0.0,>=2.193.0
2
+ aws-solutions-constructs.aws-lambda-sqs==2.85.4
3
+ aws-solutions-constructs.aws-sqs-lambda==2.85.4
4
+ aws-solutions-constructs.core==2.85.4
5
+ constructs<11.0.0,>=10.0.0
6
+ jsii<2.0.0,>=1.111.0
7
+ publication>=0.0.3
8
+ typeguard<4.3.0,>=2.13.3
@@ -1,188 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-lambda-sqs-lambda
3
- Version: 2.85.2
4
- Summary: CDK construct that provisions (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
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.193.0
22
- Requires-Dist: aws-solutions-constructs.aws-lambda-sqs==2.85.2
23
- Requires-Dist: aws-solutions-constructs.aws-sqs-lambda==2.85.2
24
- Requires-Dist: aws-solutions-constructs.core==2.85.2
25
- Requires-Dist: constructs<11.0.0,>=10.0.0
26
- Requires-Dist: jsii<2.0.0,>=1.111.0
27
- Requires-Dist: publication>=0.0.3
28
- Requires-Dist: typeguard<4.3.0,>=2.13.3
29
-
30
- # aws-lambda-sqs-lambda 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
- > All classes are under active development and subject to non-backward compatible changes or removal in any
38
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
39
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
40
-
41
- ---
42
- <!--END STABILITY BANNER-->
43
-
44
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
45
- |:-------------|:-------------|
46
-
47
- <div style="height:8px"></div>
48
-
49
- | **Language** | **Package** |
50
- |:-------------|-----------------|
51
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs_lambda`|
52
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs-lambda`|
53
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqslambda`|
54
-
55
- ## Overview
56
-
57
- This AWS Solutions Construct implements (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
58
-
59
- Here is a minimal deployable pattern definition:
60
-
61
- Typescript
62
-
63
- ```python
64
- import { Construct } from 'constructs';
65
- import { Stack, StackProps } from 'aws-cdk-lib';
66
- import { LambdaToSqsToLambda, LambdaToSqsToLambdaProps } from "@aws-solutions-constructs/aws-lambda-sqs-lambda";
67
- import * as lambda from 'aws-cdk-lib/aws-lambda';
68
-
69
- new LambdaToSqsToLambda(this, 'LambdaToSqsToLambdaPattern', {
70
- producerLambdaFunctionProps: {
71
- runtime: lambda.Runtime.NODEJS_20_X,
72
- handler: 'index.handler',
73
- code: lambda.Code.fromAsset(`producer-lambda`)
74
- },
75
- consumerLambdaFunctionProps: {
76
- runtime: lambda.Runtime.NODEJS_20_X,
77
- handler: 'index.handler',
78
- code: lambda.Code.fromAsset(`consumer-lambda`)
79
- }
80
- });
81
- ```
82
-
83
- Python
84
-
85
- ```python
86
- from aws_solutions_constructs.aws_lambda_sqs_lambda import LambdaToSqsToLambda
87
- from aws_cdk import (
88
- aws_lambda as _lambda,
89
- Stack
90
- )
91
- from constructs import Construct
92
-
93
- LambdaToSqsToLambda(
94
- self, 'LambdaToSqsToLambdaPattern',
95
- producer_lambda_function_props=_lambda.FunctionProps(
96
- code=_lambda.Code.from_asset('producer_lambda'),
97
- runtime=_lambda.Runtime.PYTHON_3_11,
98
- handler='index.handler'
99
- ),
100
- consumer_lambda_function_props=_lambda.FunctionProps(
101
- code=_lambda.Code.from_asset('consumer_lambda'),
102
- runtime=_lambda.Runtime.PYTHON_3_11,
103
- handler='index.handler'
104
- )
105
- )
106
- ```
107
-
108
- Java
109
-
110
- ```java
111
- import software.constructs.Construct;
112
-
113
- import software.amazon.awscdk.Stack;
114
- import software.amazon.awscdk.StackProps;
115
- import software.amazon.awscdk.services.lambda.*;
116
- import software.amazon.awscdk.services.lambda.Runtime;
117
- import software.amazon.awsconstructs.services.lambdasqslambda.*;
118
-
119
- new LambdaToSqsToLambda(this, "LambdaToSqsToLambdaPattern", new LambdaToSqsToLambdaProps.Builder()
120
- .producerLambdaFunctionProps(new FunctionProps.Builder()
121
- .runtime(Runtime.NODEJS_20_X)
122
- .code(Code.fromAsset("producer-lambda"))
123
- .handler("index.handler")
124
- .build())
125
- .consumerLambdaFunctionProps(new FunctionProps.Builder()
126
- .runtime(Runtime.NODEJS_20_X)
127
- .code(Code.fromAsset("consumer-lambda"))
128
- .handler("index.handler")
129
- .build())
130
- .build());
131
- ```
132
-
133
- ## Pattern Construct Props
134
-
135
- | **Name** | **Type** | **Description** |
136
- |:-------------|:----------------|-----------------|
137
- |existingProducerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. Providing both this and `producerLambdaFunctionProps` will cause an error. |
138
- |producerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the producer Lambda function. |
139
- |existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|An optional, existing SQS queue to be used instead of the default queue. Providing both this and `queueProps` will cause an error.|
140
- |queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided properties to override the default properties for the SQS queue. Providing both this and `existingQueueObj` will cause an error. |
141
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
142
- |deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the dead letter queue. Only used if the `deployDeadLetterQueue` property is set to `true`.|
143
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
144
- |existingConsumerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. Providing both this and `consumerLambdaFunctionProps` will cause an error. |
145
- |consumerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the consumer Lambda function.|
146
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
147
- |sqsEventSourceProps?| [`SqsEventSourceProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.SqsEventSourceProps.html)|Optional user provided properties for the queue event source.|
148
- |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 SQS. 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.|
149
- |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. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
150
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
151
-
152
- ## Pattern Properties
153
-
154
- | **Name** | **Type** | **Description** |
155
- |:-------------|:----------------|-----------------|
156
- |producerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the producer Lambda function created by the pattern.|
157
- |sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern. |
158
- |deadLetterQueue?|[`sqs.Queue \| undefined`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead letter queue created by the pattern, if one is deployed.|
159
- |consumerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the consumer Lambda function created by the pattern.|
160
- |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 (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|
161
-
162
- ## Default Settings
163
-
164
- Out-of-the-box implementation of this Construct (without any overridden properties) will adhere to the following defaults:
165
-
166
- ### AWS Lambda Functions
167
-
168
- * Configure limited privilege access IAM role for Lambda functions.
169
- * Enable reusing connections with Keep-Alive for NodeJs Lambda functions.
170
- * Enable X-Ray Tracing
171
- * Set Environment Variables
172
-
173
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
174
-
175
- ### Amazon SQS Queue
176
-
177
- * Deploy a dead letter queue for the primary queue.
178
- * Enable server-side encryption for the primary queue using an AWS Managed KMS Key.
179
- * Enforce encryption of data in transit
180
-
181
- ## Architecture
182
-
183
- ![Architecture Diagram](architecture.png)
184
-
185
- ---
186
-
187
-
188
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,159 +0,0 @@
1
- # aws-lambda-sqs-lambda module
2
-
3
- <!--BEGIN STABILITY BANNER-->---
4
-
5
-
6
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
7
-
8
- > All classes are under active development and subject to non-backward compatible changes or removal in any
9
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
10
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
11
-
12
- ---
13
- <!--END STABILITY BANNER-->
14
-
15
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
16
- |:-------------|:-------------|
17
-
18
- <div style="height:8px"></div>
19
-
20
- | **Language** | **Package** |
21
- |:-------------|-----------------|
22
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs_lambda`|
23
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs-lambda`|
24
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqslambda`|
25
-
26
- ## Overview
27
-
28
- This AWS Solutions Construct implements (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
29
-
30
- Here is a minimal deployable pattern definition:
31
-
32
- Typescript
33
-
34
- ```python
35
- import { Construct } from 'constructs';
36
- import { Stack, StackProps } from 'aws-cdk-lib';
37
- import { LambdaToSqsToLambda, LambdaToSqsToLambdaProps } from "@aws-solutions-constructs/aws-lambda-sqs-lambda";
38
- import * as lambda from 'aws-cdk-lib/aws-lambda';
39
-
40
- new LambdaToSqsToLambda(this, 'LambdaToSqsToLambdaPattern', {
41
- producerLambdaFunctionProps: {
42
- runtime: lambda.Runtime.NODEJS_20_X,
43
- handler: 'index.handler',
44
- code: lambda.Code.fromAsset(`producer-lambda`)
45
- },
46
- consumerLambdaFunctionProps: {
47
- runtime: lambda.Runtime.NODEJS_20_X,
48
- handler: 'index.handler',
49
- code: lambda.Code.fromAsset(`consumer-lambda`)
50
- }
51
- });
52
- ```
53
-
54
- Python
55
-
56
- ```python
57
- from aws_solutions_constructs.aws_lambda_sqs_lambda import LambdaToSqsToLambda
58
- from aws_cdk import (
59
- aws_lambda as _lambda,
60
- Stack
61
- )
62
- from constructs import Construct
63
-
64
- LambdaToSqsToLambda(
65
- self, 'LambdaToSqsToLambdaPattern',
66
- producer_lambda_function_props=_lambda.FunctionProps(
67
- code=_lambda.Code.from_asset('producer_lambda'),
68
- runtime=_lambda.Runtime.PYTHON_3_11,
69
- handler='index.handler'
70
- ),
71
- consumer_lambda_function_props=_lambda.FunctionProps(
72
- code=_lambda.Code.from_asset('consumer_lambda'),
73
- runtime=_lambda.Runtime.PYTHON_3_11,
74
- handler='index.handler'
75
- )
76
- )
77
- ```
78
-
79
- Java
80
-
81
- ```java
82
- import software.constructs.Construct;
83
-
84
- import software.amazon.awscdk.Stack;
85
- import software.amazon.awscdk.StackProps;
86
- import software.amazon.awscdk.services.lambda.*;
87
- import software.amazon.awscdk.services.lambda.Runtime;
88
- import software.amazon.awsconstructs.services.lambdasqslambda.*;
89
-
90
- new LambdaToSqsToLambda(this, "LambdaToSqsToLambdaPattern", new LambdaToSqsToLambdaProps.Builder()
91
- .producerLambdaFunctionProps(new FunctionProps.Builder()
92
- .runtime(Runtime.NODEJS_20_X)
93
- .code(Code.fromAsset("producer-lambda"))
94
- .handler("index.handler")
95
- .build())
96
- .consumerLambdaFunctionProps(new FunctionProps.Builder()
97
- .runtime(Runtime.NODEJS_20_X)
98
- .code(Code.fromAsset("consumer-lambda"))
99
- .handler("index.handler")
100
- .build())
101
- .build());
102
- ```
103
-
104
- ## Pattern Construct Props
105
-
106
- | **Name** | **Type** | **Description** |
107
- |:-------------|:----------------|-----------------|
108
- |existingProducerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. Providing both this and `producerLambdaFunctionProps` will cause an error. |
109
- |producerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the producer Lambda function. |
110
- |existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|An optional, existing SQS queue to be used instead of the default queue. Providing both this and `queueProps` will cause an error.|
111
- |queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided properties to override the default properties for the SQS queue. Providing both this and `existingQueueObj` will cause an error. |
112
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
113
- |deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the dead letter queue. Only used if the `deployDeadLetterQueue` property is set to `true`.|
114
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
115
- |existingConsumerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. Providing both this and `consumerLambdaFunctionProps` will cause an error. |
116
- |consumerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the consumer Lambda function.|
117
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
118
- |sqsEventSourceProps?| [`SqsEventSourceProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.SqsEventSourceProps.html)|Optional user provided properties for the queue event source.|
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 SQS. 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. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
121
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
122
-
123
- ## Pattern Properties
124
-
125
- | **Name** | **Type** | **Description** |
126
- |:-------------|:----------------|-----------------|
127
- |producerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the producer Lambda function created by the pattern.|
128
- |sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern. |
129
- |deadLetterQueue?|[`sqs.Queue \| undefined`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead letter queue created by the pattern, if one is deployed.|
130
- |consumerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the consumer Lambda function created by the pattern.|
131
- |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 (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|
132
-
133
- ## Default Settings
134
-
135
- Out-of-the-box implementation of this Construct (without any overridden properties) will adhere to the following defaults:
136
-
137
- ### AWS Lambda Functions
138
-
139
- * Configure limited privilege access IAM role for Lambda functions.
140
- * Enable reusing connections with Keep-Alive for NodeJs Lambda functions.
141
- * Enable X-Ray Tracing
142
- * Set Environment Variables
143
-
144
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
145
-
146
- ### Amazon SQS Queue
147
-
148
- * Deploy a dead letter queue for the primary queue.
149
- * Enable server-side encryption for the primary queue using an AWS Managed KMS Key.
150
- * Enforce encryption of data in transit
151
-
152
- ## Architecture
153
-
154
- ![Architecture Diagram](architecture.png)
155
-
156
- ---
157
-
158
-
159
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,188 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-lambda-sqs-lambda
3
- Version: 2.85.2
4
- Summary: CDK construct that provisions (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
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.193.0
22
- Requires-Dist: aws-solutions-constructs.aws-lambda-sqs==2.85.2
23
- Requires-Dist: aws-solutions-constructs.aws-sqs-lambda==2.85.2
24
- Requires-Dist: aws-solutions-constructs.core==2.85.2
25
- Requires-Dist: constructs<11.0.0,>=10.0.0
26
- Requires-Dist: jsii<2.0.0,>=1.111.0
27
- Requires-Dist: publication>=0.0.3
28
- Requires-Dist: typeguard<4.3.0,>=2.13.3
29
-
30
- # aws-lambda-sqs-lambda 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
- > All classes are under active development and subject to non-backward compatible changes or removal in any
38
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
39
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
40
-
41
- ---
42
- <!--END STABILITY BANNER-->
43
-
44
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
45
- |:-------------|:-------------|
46
-
47
- <div style="height:8px"></div>
48
-
49
- | **Language** | **Package** |
50
- |:-------------|-----------------|
51
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs_lambda`|
52
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs-lambda`|
53
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqslambda`|
54
-
55
- ## Overview
56
-
57
- This AWS Solutions Construct implements (1) an AWS Lambda function that is configured to send messages to a queue; (2) an Amazon SQS queue; and (3) an AWS Lambda function configured to consume messages from the queue.
58
-
59
- Here is a minimal deployable pattern definition:
60
-
61
- Typescript
62
-
63
- ```python
64
- import { Construct } from 'constructs';
65
- import { Stack, StackProps } from 'aws-cdk-lib';
66
- import { LambdaToSqsToLambda, LambdaToSqsToLambdaProps } from "@aws-solutions-constructs/aws-lambda-sqs-lambda";
67
- import * as lambda from 'aws-cdk-lib/aws-lambda';
68
-
69
- new LambdaToSqsToLambda(this, 'LambdaToSqsToLambdaPattern', {
70
- producerLambdaFunctionProps: {
71
- runtime: lambda.Runtime.NODEJS_20_X,
72
- handler: 'index.handler',
73
- code: lambda.Code.fromAsset(`producer-lambda`)
74
- },
75
- consumerLambdaFunctionProps: {
76
- runtime: lambda.Runtime.NODEJS_20_X,
77
- handler: 'index.handler',
78
- code: lambda.Code.fromAsset(`consumer-lambda`)
79
- }
80
- });
81
- ```
82
-
83
- Python
84
-
85
- ```python
86
- from aws_solutions_constructs.aws_lambda_sqs_lambda import LambdaToSqsToLambda
87
- from aws_cdk import (
88
- aws_lambda as _lambda,
89
- Stack
90
- )
91
- from constructs import Construct
92
-
93
- LambdaToSqsToLambda(
94
- self, 'LambdaToSqsToLambdaPattern',
95
- producer_lambda_function_props=_lambda.FunctionProps(
96
- code=_lambda.Code.from_asset('producer_lambda'),
97
- runtime=_lambda.Runtime.PYTHON_3_11,
98
- handler='index.handler'
99
- ),
100
- consumer_lambda_function_props=_lambda.FunctionProps(
101
- code=_lambda.Code.from_asset('consumer_lambda'),
102
- runtime=_lambda.Runtime.PYTHON_3_11,
103
- handler='index.handler'
104
- )
105
- )
106
- ```
107
-
108
- Java
109
-
110
- ```java
111
- import software.constructs.Construct;
112
-
113
- import software.amazon.awscdk.Stack;
114
- import software.amazon.awscdk.StackProps;
115
- import software.amazon.awscdk.services.lambda.*;
116
- import software.amazon.awscdk.services.lambda.Runtime;
117
- import software.amazon.awsconstructs.services.lambdasqslambda.*;
118
-
119
- new LambdaToSqsToLambda(this, "LambdaToSqsToLambdaPattern", new LambdaToSqsToLambdaProps.Builder()
120
- .producerLambdaFunctionProps(new FunctionProps.Builder()
121
- .runtime(Runtime.NODEJS_20_X)
122
- .code(Code.fromAsset("producer-lambda"))
123
- .handler("index.handler")
124
- .build())
125
- .consumerLambdaFunctionProps(new FunctionProps.Builder()
126
- .runtime(Runtime.NODEJS_20_X)
127
- .code(Code.fromAsset("consumer-lambda"))
128
- .handler("index.handler")
129
- .build())
130
- .build());
131
- ```
132
-
133
- ## Pattern Construct Props
134
-
135
- | **Name** | **Type** | **Description** |
136
- |:-------------|:----------------|-----------------|
137
- |existingProducerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. Providing both this and `producerLambdaFunctionProps` will cause an error. |
138
- |producerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the producer Lambda function. |
139
- |existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|An optional, existing SQS queue to be used instead of the default queue. Providing both this and `queueProps` will cause an error.|
140
- |queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided properties to override the default properties for the SQS queue. Providing both this and `existingQueueObj` will cause an error. |
141
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
142
- |deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the dead letter queue. Only used if the `deployDeadLetterQueue` property is set to `true`.|
143
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
144
- |existingConsumerLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. Providing both this and `consumerLambdaFunctionProps` will cause an error. |
145
- |consumerLambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties for the consumer Lambda function.|
146
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
147
- |sqsEventSourceProps?| [`SqsEventSourceProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.SqsEventSourceProps.html)|Optional user provided properties for the queue event source.|
148
- |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 SQS. 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.|
149
- |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. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
150
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
151
-
152
- ## Pattern Properties
153
-
154
- | **Name** | **Type** | **Description** |
155
- |:-------------|:----------------|-----------------|
156
- |producerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the producer Lambda function created by the pattern.|
157
- |sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern. |
158
- |deadLetterQueue?|[`sqs.Queue \| undefined`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead letter queue created by the pattern, if one is deployed.|
159
- |consumerLambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the consumer Lambda function created by the pattern.|
160
- |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 (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|
161
-
162
- ## Default Settings
163
-
164
- Out-of-the-box implementation of this Construct (without any overridden properties) will adhere to the following defaults:
165
-
166
- ### AWS Lambda Functions
167
-
168
- * Configure limited privilege access IAM role for Lambda functions.
169
- * Enable reusing connections with Keep-Alive for NodeJs Lambda functions.
170
- * Enable X-Ray Tracing
171
- * Set Environment Variables
172
-
173
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
174
-
175
- ### Amazon SQS Queue
176
-
177
- * Deploy a dead letter queue for the primary queue.
178
- * Enable server-side encryption for the primary queue using an AWS Managed KMS Key.
179
- * Enforce encryption of data in transit
180
-
181
- ## Architecture
182
-
183
- ![Architecture Diagram](architecture.png)
184
-
185
- ---
186
-
187
-
188
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,8 +0,0 @@
1
- aws-cdk-lib<3.0.0,>=2.193.0
2
- aws-solutions-constructs.aws-lambda-sqs==2.85.2
3
- aws-solutions-constructs.aws-sqs-lambda==2.85.2
4
- aws-solutions-constructs.core==2.85.2
5
- constructs<11.0.0,>=10.0.0
6
- jsii<2.0.0,>=1.111.0
7
- publication>=0.0.3
8
- typeguard<4.3.0,>=2.13.3