aws-solutions-constructs.aws-sqs-lambda 2.85.1__tar.gz → 2.85.3__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.
- aws_solutions_constructs_aws_sqs_lambda-2.85.3/PKG-INFO +28 -0
- aws_solutions_constructs_aws_sqs_lambda-2.85.3/README.md +1 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/setup.py +3 -3
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs/aws_sqs_lambda/__init__.py +1 -135
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/__init__.py +2 -2
- aws_solutions_constructs_aws_sqs_lambda-2.85.3/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@2.85.3.jsii.tgz +0 -0
- aws_solutions_constructs_aws_sqs_lambda-2.85.3/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/PKG-INFO +28 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/SOURCES.txt +1 -1
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/requires.txt +1 -1
- aws_solutions_constructs_aws_sqs_lambda-2.85.1/PKG-INFO +0 -162
- aws_solutions_constructs_aws_sqs_lambda-2.85.1/README.md +0 -135
- aws_solutions_constructs_aws_sqs_lambda-2.85.1/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@2.85.1.jsii.tgz +0 -0
- aws_solutions_constructs_aws_sqs_lambda-2.85.1/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/PKG-INFO +0 -162
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/LICENSE +0 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/MANIFEST.in +0 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/pyproject.toml +0 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/setup.cfg +0 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs/aws_sqs_lambda/py.typed +0 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/dependency_links.txt +0 -0
- {aws_solutions_constructs_aws_sqs_lambda-2.85.1 → aws_solutions_constructs_aws_sqs_lambda-2.85.3}/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aws-solutions-constructs.aws-sqs-lambda
|
|
3
|
+
Version: 2.85.3
|
|
4
|
+
Summary: CDK constructs for defining an interaction between an Amazon SQS queue and an AWS Lambda function.
|
|
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.core==2.85.3
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.111.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-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-sqs-lambda/README.adoc)
|
|
@@ -5,7 +5,7 @@ kwargs = json.loads(
|
|
|
5
5
|
"""
|
|
6
6
|
{
|
|
7
7
|
"name": "aws-solutions-constructs.aws-sqs-lambda",
|
|
8
|
-
"version": "2.85.
|
|
8
|
+
"version": "2.85.3",
|
|
9
9
|
"description": "CDK constructs for defining an interaction between an Amazon SQS queue and an AWS Lambda function.",
|
|
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_sqs_lambda._jsii": [
|
|
29
|
-
"aws-sqs-lambda@2.85.
|
|
29
|
+
"aws-sqs-lambda@2.85.3.jsii.tgz"
|
|
30
30
|
],
|
|
31
31
|
"aws_solutions_constructs.aws_sqs_lambda": [
|
|
32
32
|
"py.typed"
|
|
@@ -35,7 +35,7 @@ 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.core==2.85.
|
|
38
|
+
"aws-solutions-constructs.core==2.85.3",
|
|
39
39
|
"constructs>=10.0.0, <11.0.0",
|
|
40
40
|
"jsii>=1.111.0, <2.0.0",
|
|
41
41
|
"publication>=0.0.3",
|
|
@@ -1,139 +1,5 @@
|
|
|
1
1
|
r'''
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-

|
|
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|`aws_solutions_constructs.aws_sqs_lambda`|
|
|
20
|
-
| Typescript|`@aws-solutions-constructs/aws-sqs-lambda`|
|
|
21
|
-
| Java|`software.amazon.awsconstructs.services.sqslambda`|
|
|
22
|
-
|
|
23
|
-
## Overview
|
|
24
|
-
|
|
25
|
-
This AWS Solutions Construct implements an Amazon SQS queue connected to an AWS Lambda function.
|
|
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 { SqsToLambda, SqsToLambdaProps } from "@aws-solutions-constructs/aws-sqs-lambda";
|
|
35
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
36
|
-
|
|
37
|
-
new SqsToLambda(this, 'SqsToLambdaPattern', {
|
|
38
|
-
lambdaFunctionProps: {
|
|
39
|
-
runtime: lambda.Runtime.NODEJS_20_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_sqs_lambda import SqsToLambda
|
|
50
|
-
from aws_cdk import (
|
|
51
|
-
aws_lambda as _lambda,
|
|
52
|
-
Stack
|
|
53
|
-
)
|
|
54
|
-
from constructs import Construct
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
SqsToLambda(self, 'SqsToLambdaPattern',
|
|
58
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
59
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
60
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
61
|
-
handler='index.handler'
|
|
62
|
-
)
|
|
63
|
-
)
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Java
|
|
67
|
-
|
|
68
|
-
```java
|
|
69
|
-
import software.constructs.Construct;
|
|
70
|
-
|
|
71
|
-
import software.amazon.awscdk.Stack;
|
|
72
|
-
import software.amazon.awscdk.StackProps;
|
|
73
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
74
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
75
|
-
import software.amazon.awsconstructs.services.sqslambda.*;
|
|
76
|
-
|
|
77
|
-
new SqsToLambda(this, "SnsToSqsPattern", new SqsToLambdaProps.Builder()
|
|
78
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
79
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
80
|
-
.code(Code.fromAsset("lambda"))
|
|
81
|
-
.handler("index.handler")
|
|
82
|
-
.build())
|
|
83
|
-
.build());
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Pattern Construct Props
|
|
87
|
-
|
|
88
|
-
| **Name** | **Type** | **Description** |
|
|
89
|
-
|:-------------|:----------------|-----------------|
|
|
90
|
-
|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.|
|
|
91
|
-
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|
|
92
|
-
|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.|
|
|
93
|
-
|queueProps?|[`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 SQS queue.|
|
|
94
|
-
|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 SQS queue.|
|
|
95
|
-
|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to true.|
|
|
96
|
-
|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to 15.|
|
|
97
|
-
|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.|
|
|
98
|
-
|enableEncryptionWithCustomerManagedKey?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.|
|
|
99
|
-
|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.|
|
|
100
|
-
|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.|
|
|
101
|
-
|
|
102
|
-
## Pattern Properties
|
|
103
|
-
|
|
104
|
-
| **Name** | **Type** | **Description** |
|
|
105
|
-
|:-------------|:----------------|-----------------|
|
|
106
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
107
|
-
|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.|
|
|
108
|
-
|deadLetterQueue?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead-letter SQS queue created by the pattern.|
|
|
109
|
-
|
|
110
|
-
## Default settings
|
|
111
|
-
|
|
112
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
113
|
-
|
|
114
|
-
### Amazon SQS Queue
|
|
115
|
-
|
|
116
|
-
* Deploy SQS dead-letter queue for the source SQS Queue
|
|
117
|
-
* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
|
|
118
|
-
* Enforce encryption of data in transit
|
|
119
|
-
|
|
120
|
-
### AWS Lambda Function
|
|
121
|
-
|
|
122
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
123
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
124
|
-
* Enable X-Ray Tracing
|
|
125
|
-
* Set Environment Variables
|
|
126
|
-
|
|
127
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
128
|
-
|
|
129
|
-
## Architecture
|
|
130
|
-
|
|
131
|
-

|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
© 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-sqs-lambda/README.adoc)
|
|
137
3
|
'''
|
|
138
4
|
from pkgutil import extend_path
|
|
139
5
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -34,9 +34,9 @@ import constructs._jsii
|
|
|
34
34
|
|
|
35
35
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
36
36
|
"@aws-solutions-constructs/aws-sqs-lambda",
|
|
37
|
-
"2.85.
|
|
37
|
+
"2.85.3",
|
|
38
38
|
__name__[0:-6],
|
|
39
|
-
"aws-sqs-lambda@2.85.
|
|
39
|
+
"aws-sqs-lambda@2.85.3.jsii.tgz",
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
__all__ = [
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aws-solutions-constructs.aws-sqs-lambda
|
|
3
|
+
Version: 2.85.3
|
|
4
|
+
Summary: CDK constructs for defining an interaction between an Amazon SQS queue and an AWS Lambda function.
|
|
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.core==2.85.3
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.111.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-sqs-lambda/README.adoc)
|
|
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_sqs_lambda.egg-info/top_level.txt
|
|
|
11
11
|
src/aws_solutions_constructs/aws_sqs_lambda/__init__.py
|
|
12
12
|
src/aws_solutions_constructs/aws_sqs_lambda/py.typed
|
|
13
13
|
src/aws_solutions_constructs/aws_sqs_lambda/_jsii/__init__.py
|
|
14
|
-
src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@2.85.
|
|
14
|
+
src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@2.85.3.jsii.tgz
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: aws-solutions-constructs.aws-sqs-lambda
|
|
3
|
-
Version: 2.85.1
|
|
4
|
-
Summary: CDK constructs for defining an interaction between an Amazon SQS queue and an AWS Lambda function.
|
|
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.core==2.85.1
|
|
23
|
-
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
-
Requires-Dist: jsii<2.0.0,>=1.111.0
|
|
25
|
-
Requires-Dist: publication>=0.0.3
|
|
26
|
-
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
-
|
|
28
|
-
# aws-sqs-lambda module
|
|
29
|
-
|
|
30
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
<!--END STABILITY BANNER-->
|
|
37
|
-
|
|
38
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
39
|
-
|:-------------|:-------------|
|
|
40
|
-
|
|
41
|
-
<div style="height:8px"></div>
|
|
42
|
-
|
|
43
|
-
| **Language** | **Package** |
|
|
44
|
-
|:-------------|-----------------|
|
|
45
|
-
| Python|`aws_solutions_constructs.aws_sqs_lambda`|
|
|
46
|
-
| Typescript|`@aws-solutions-constructs/aws-sqs-lambda`|
|
|
47
|
-
| Java|`software.amazon.awsconstructs.services.sqslambda`|
|
|
48
|
-
|
|
49
|
-
## Overview
|
|
50
|
-
|
|
51
|
-
This AWS Solutions Construct implements an Amazon SQS queue connected to an AWS Lambda function.
|
|
52
|
-
|
|
53
|
-
Here is a minimal deployable pattern definition:
|
|
54
|
-
|
|
55
|
-
Typescript
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
import { Construct } from 'constructs';
|
|
59
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
60
|
-
import { SqsToLambda, SqsToLambdaProps } from "@aws-solutions-constructs/aws-sqs-lambda";
|
|
61
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
62
|
-
|
|
63
|
-
new SqsToLambda(this, 'SqsToLambdaPattern', {
|
|
64
|
-
lambdaFunctionProps: {
|
|
65
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
66
|
-
handler: 'index.handler',
|
|
67
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Python
|
|
73
|
-
|
|
74
|
-
```python
|
|
75
|
-
from aws_solutions_constructs.aws_sqs_lambda import SqsToLambda
|
|
76
|
-
from aws_cdk import (
|
|
77
|
-
aws_lambda as _lambda,
|
|
78
|
-
Stack
|
|
79
|
-
)
|
|
80
|
-
from constructs import Construct
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
SqsToLambda(self, 'SqsToLambdaPattern',
|
|
84
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
85
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
86
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
87
|
-
handler='index.handler'
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Java
|
|
93
|
-
|
|
94
|
-
```java
|
|
95
|
-
import software.constructs.Construct;
|
|
96
|
-
|
|
97
|
-
import software.amazon.awscdk.Stack;
|
|
98
|
-
import software.amazon.awscdk.StackProps;
|
|
99
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
100
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
101
|
-
import software.amazon.awsconstructs.services.sqslambda.*;
|
|
102
|
-
|
|
103
|
-
new SqsToLambda(this, "SnsToSqsPattern", new SqsToLambdaProps.Builder()
|
|
104
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
105
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
106
|
-
.code(Code.fromAsset("lambda"))
|
|
107
|
-
.handler("index.handler")
|
|
108
|
-
.build())
|
|
109
|
-
.build());
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Pattern Construct Props
|
|
113
|
-
|
|
114
|
-
| **Name** | **Type** | **Description** |
|
|
115
|
-
|:-------------|:----------------|-----------------|
|
|
116
|
-
|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.|
|
|
117
|
-
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|
|
118
|
-
|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.|
|
|
119
|
-
|queueProps?|[`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 SQS queue.|
|
|
120
|
-
|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 SQS queue.|
|
|
121
|
-
|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to true.|
|
|
122
|
-
|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to 15.|
|
|
123
|
-
|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.|
|
|
124
|
-
|enableEncryptionWithCustomerManagedKey?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.|
|
|
125
|
-
|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.|
|
|
126
|
-
|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.|
|
|
127
|
-
|
|
128
|
-
## Pattern Properties
|
|
129
|
-
|
|
130
|
-
| **Name** | **Type** | **Description** |
|
|
131
|
-
|:-------------|:----------------|-----------------|
|
|
132
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
133
|
-
|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.|
|
|
134
|
-
|deadLetterQueue?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead-letter SQS queue created by the pattern.|
|
|
135
|
-
|
|
136
|
-
## Default settings
|
|
137
|
-
|
|
138
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
139
|
-
|
|
140
|
-
### Amazon SQS Queue
|
|
141
|
-
|
|
142
|
-
* Deploy SQS dead-letter queue for the source SQS Queue
|
|
143
|
-
* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
|
|
144
|
-
* Enforce encryption of data in transit
|
|
145
|
-
|
|
146
|
-
### AWS Lambda Function
|
|
147
|
-
|
|
148
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
149
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
150
|
-
* Enable X-Ray Tracing
|
|
151
|
-
* Set Environment Variables
|
|
152
|
-
|
|
153
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
154
|
-
|
|
155
|
-
## Architecture
|
|
156
|
-
|
|
157
|
-

|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# aws-sqs-lambda module
|
|
2
|
-
|
|
3
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
<!--END STABILITY BANNER-->
|
|
10
|
-
|
|
11
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
12
|
-
|:-------------|:-------------|
|
|
13
|
-
|
|
14
|
-
<div style="height:8px"></div>
|
|
15
|
-
|
|
16
|
-
| **Language** | **Package** |
|
|
17
|
-
|:-------------|-----------------|
|
|
18
|
-
| Python|`aws_solutions_constructs.aws_sqs_lambda`|
|
|
19
|
-
| Typescript|`@aws-solutions-constructs/aws-sqs-lambda`|
|
|
20
|
-
| Java|`software.amazon.awsconstructs.services.sqslambda`|
|
|
21
|
-
|
|
22
|
-
## Overview
|
|
23
|
-
|
|
24
|
-
This AWS Solutions Construct implements an Amazon SQS queue connected to an AWS Lambda function.
|
|
25
|
-
|
|
26
|
-
Here is a minimal deployable pattern definition:
|
|
27
|
-
|
|
28
|
-
Typescript
|
|
29
|
-
|
|
30
|
-
```python
|
|
31
|
-
import { Construct } from 'constructs';
|
|
32
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
33
|
-
import { SqsToLambda, SqsToLambdaProps } from "@aws-solutions-constructs/aws-sqs-lambda";
|
|
34
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
35
|
-
|
|
36
|
-
new SqsToLambda(this, 'SqsToLambdaPattern', {
|
|
37
|
-
lambdaFunctionProps: {
|
|
38
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
39
|
-
handler: 'index.handler',
|
|
40
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Python
|
|
46
|
-
|
|
47
|
-
```python
|
|
48
|
-
from aws_solutions_constructs.aws_sqs_lambda import SqsToLambda
|
|
49
|
-
from aws_cdk import (
|
|
50
|
-
aws_lambda as _lambda,
|
|
51
|
-
Stack
|
|
52
|
-
)
|
|
53
|
-
from constructs import Construct
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
SqsToLambda(self, 'SqsToLambdaPattern',
|
|
57
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
58
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
59
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
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.sqslambda.*;
|
|
75
|
-
|
|
76
|
-
new SqsToLambda(this, "SnsToSqsPattern", new SqsToLambdaProps.Builder()
|
|
77
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
78
|
-
.runtime(Runtime.NODEJS_20_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)|User provided props to override the default props for the Lambda function.|
|
|
91
|
-
|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.|
|
|
92
|
-
|queueProps?|[`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 SQS queue.|
|
|
93
|
-
|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 SQS queue.|
|
|
94
|
-
|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to true.|
|
|
95
|
-
|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to 15.|
|
|
96
|
-
|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.|
|
|
97
|
-
|enableEncryptionWithCustomerManagedKey?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.|
|
|
98
|
-
|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.|
|
|
99
|
-
|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.|
|
|
100
|
-
|
|
101
|
-
## Pattern Properties
|
|
102
|
-
|
|
103
|
-
| **Name** | **Type** | **Description** |
|
|
104
|
-
|:-------------|:----------------|-----------------|
|
|
105
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
106
|
-
|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.|
|
|
107
|
-
|deadLetterQueue?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead-letter SQS queue created by the pattern.|
|
|
108
|
-
|
|
109
|
-
## Default settings
|
|
110
|
-
|
|
111
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
112
|
-
|
|
113
|
-
### Amazon SQS Queue
|
|
114
|
-
|
|
115
|
-
* Deploy SQS dead-letter queue for the source SQS Queue
|
|
116
|
-
* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
|
|
117
|
-
* Enforce encryption of data in transit
|
|
118
|
-
|
|
119
|
-
### AWS Lambda Function
|
|
120
|
-
|
|
121
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
122
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
123
|
-
* Enable X-Ray Tracing
|
|
124
|
-
* Set Environment Variables
|
|
125
|
-
|
|
126
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
127
|
-
|
|
128
|
-
## Architecture
|
|
129
|
-
|
|
130
|
-

|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
Binary file
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: aws-solutions-constructs.aws-sqs-lambda
|
|
3
|
-
Version: 2.85.1
|
|
4
|
-
Summary: CDK constructs for defining an interaction between an Amazon SQS queue and an AWS Lambda function.
|
|
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.core==2.85.1
|
|
23
|
-
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
-
Requires-Dist: jsii<2.0.0,>=1.111.0
|
|
25
|
-
Requires-Dist: publication>=0.0.3
|
|
26
|
-
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
-
|
|
28
|
-
# aws-sqs-lambda module
|
|
29
|
-
|
|
30
|
-
<!--BEGIN STABILITY BANNER-->---
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
<!--END STABILITY BANNER-->
|
|
37
|
-
|
|
38
|
-
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|
|
39
|
-
|:-------------|:-------------|
|
|
40
|
-
|
|
41
|
-
<div style="height:8px"></div>
|
|
42
|
-
|
|
43
|
-
| **Language** | **Package** |
|
|
44
|
-
|:-------------|-----------------|
|
|
45
|
-
| Python|`aws_solutions_constructs.aws_sqs_lambda`|
|
|
46
|
-
| Typescript|`@aws-solutions-constructs/aws-sqs-lambda`|
|
|
47
|
-
| Java|`software.amazon.awsconstructs.services.sqslambda`|
|
|
48
|
-
|
|
49
|
-
## Overview
|
|
50
|
-
|
|
51
|
-
This AWS Solutions Construct implements an Amazon SQS queue connected to an AWS Lambda function.
|
|
52
|
-
|
|
53
|
-
Here is a minimal deployable pattern definition:
|
|
54
|
-
|
|
55
|
-
Typescript
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
import { Construct } from 'constructs';
|
|
59
|
-
import { Stack, StackProps } from 'aws-cdk-lib';
|
|
60
|
-
import { SqsToLambda, SqsToLambdaProps } from "@aws-solutions-constructs/aws-sqs-lambda";
|
|
61
|
-
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
62
|
-
|
|
63
|
-
new SqsToLambda(this, 'SqsToLambdaPattern', {
|
|
64
|
-
lambdaFunctionProps: {
|
|
65
|
-
runtime: lambda.Runtime.NODEJS_20_X,
|
|
66
|
-
handler: 'index.handler',
|
|
67
|
-
code: lambda.Code.fromAsset(`lambda`)
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Python
|
|
73
|
-
|
|
74
|
-
```python
|
|
75
|
-
from aws_solutions_constructs.aws_sqs_lambda import SqsToLambda
|
|
76
|
-
from aws_cdk import (
|
|
77
|
-
aws_lambda as _lambda,
|
|
78
|
-
Stack
|
|
79
|
-
)
|
|
80
|
-
from constructs import Construct
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
SqsToLambda(self, 'SqsToLambdaPattern',
|
|
84
|
-
lambda_function_props=_lambda.FunctionProps(
|
|
85
|
-
code=_lambda.Code.from_asset('lambda'),
|
|
86
|
-
runtime=_lambda.Runtime.PYTHON_3_11,
|
|
87
|
-
handler='index.handler'
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Java
|
|
93
|
-
|
|
94
|
-
```java
|
|
95
|
-
import software.constructs.Construct;
|
|
96
|
-
|
|
97
|
-
import software.amazon.awscdk.Stack;
|
|
98
|
-
import software.amazon.awscdk.StackProps;
|
|
99
|
-
import software.amazon.awscdk.services.lambda.*;
|
|
100
|
-
import software.amazon.awscdk.services.lambda.Runtime;
|
|
101
|
-
import software.amazon.awsconstructs.services.sqslambda.*;
|
|
102
|
-
|
|
103
|
-
new SqsToLambda(this, "SnsToSqsPattern", new SqsToLambdaProps.Builder()
|
|
104
|
-
.lambdaFunctionProps(new FunctionProps.Builder()
|
|
105
|
-
.runtime(Runtime.NODEJS_20_X)
|
|
106
|
-
.code(Code.fromAsset("lambda"))
|
|
107
|
-
.handler("index.handler")
|
|
108
|
-
.build())
|
|
109
|
-
.build());
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Pattern Construct Props
|
|
113
|
-
|
|
114
|
-
| **Name** | **Type** | **Description** |
|
|
115
|
-
|:-------------|:----------------|-----------------|
|
|
116
|
-
|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.|
|
|
117
|
-
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|
|
118
|
-
|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.|
|
|
119
|
-
|queueProps?|[`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 SQS queue.|
|
|
120
|
-
|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 SQS queue.|
|
|
121
|
-
|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to true.|
|
|
122
|
-
|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to 15.|
|
|
123
|
-
|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.|
|
|
124
|
-
|enableEncryptionWithCustomerManagedKey?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.|
|
|
125
|
-
|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.|
|
|
126
|
-
|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.|
|
|
127
|
-
|
|
128
|
-
## Pattern Properties
|
|
129
|
-
|
|
130
|
-
| **Name** | **Type** | **Description** |
|
|
131
|
-
|:-------------|:----------------|-----------------|
|
|
132
|
-
|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of the Lambda function created by the pattern.|
|
|
133
|
-
|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.|
|
|
134
|
-
|deadLetterQueue?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead-letter SQS queue created by the pattern.|
|
|
135
|
-
|
|
136
|
-
## Default settings
|
|
137
|
-
|
|
138
|
-
Out of the box implementation of the Construct without any override will set the following defaults:
|
|
139
|
-
|
|
140
|
-
### Amazon SQS Queue
|
|
141
|
-
|
|
142
|
-
* Deploy SQS dead-letter queue for the source SQS Queue
|
|
143
|
-
* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key
|
|
144
|
-
* Enforce encryption of data in transit
|
|
145
|
-
|
|
146
|
-
### AWS Lambda Function
|
|
147
|
-
|
|
148
|
-
* Configure limited privilege access IAM role for Lambda function
|
|
149
|
-
* Enable reusing connections with Keep-Alive for NodeJs Lambda function
|
|
150
|
-
* Enable X-Ray Tracing
|
|
151
|
-
* Set Environment Variables
|
|
152
|
-
|
|
153
|
-
* AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
|
|
154
|
-
|
|
155
|
-
## Architecture
|
|
156
|
-
|
|
157
|
-

|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|