aws-solutions-constructs.aws-lambda-sqs 2.85.2__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.
Files changed (20) hide show
  1. aws_solutions_constructs_aws_lambda_sqs-2.85.3/PKG-INFO +28 -0
  2. aws_solutions_constructs_aws_lambda_sqs-2.85.3/README.md +1 -0
  3. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/setup.py +3 -3
  4. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs/aws_lambda_sqs/__init__.py +1 -142
  5. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs/aws_lambda_sqs/_jsii/__init__.py +2 -2
  6. aws_solutions_constructs_aws_lambda_sqs-2.85.3/src/aws_solutions_constructs/aws_lambda_sqs/_jsii/aws-lambda-sqs@2.85.3.jsii.tgz +0 -0
  7. aws_solutions_constructs_aws_lambda_sqs-2.85.3/src/aws_solutions_constructs.aws_lambda_sqs.egg-info/PKG-INFO +28 -0
  8. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs.aws_lambda_sqs.egg-info/SOURCES.txt +1 -1
  9. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs.aws_lambda_sqs.egg-info/requires.txt +1 -1
  10. aws_solutions_constructs_aws_lambda_sqs-2.85.2/PKG-INFO +0 -169
  11. aws_solutions_constructs_aws_lambda_sqs-2.85.2/README.md +0 -142
  12. aws_solutions_constructs_aws_lambda_sqs-2.85.2/src/aws_solutions_constructs/aws_lambda_sqs/_jsii/aws-lambda-sqs@2.85.2.jsii.tgz +0 -0
  13. aws_solutions_constructs_aws_lambda_sqs-2.85.2/src/aws_solutions_constructs.aws_lambda_sqs.egg-info/PKG-INFO +0 -169
  14. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/LICENSE +0 -0
  15. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/MANIFEST.in +0 -0
  16. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/pyproject.toml +0 -0
  17. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/setup.cfg +0 -0
  18. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs/aws_lambda_sqs/py.typed +0 -0
  19. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs.aws_lambda_sqs.egg-info/dependency_links.txt +0 -0
  20. {aws_solutions_constructs_aws_lambda_sqs-2.85.2 → aws_solutions_constructs_aws_lambda_sqs-2.85.3}/src/aws_solutions_constructs.aws_lambda_sqs.egg-info/top_level.txt +0 -0
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-sqs
3
+ Version: 2.85.3
4
+ Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon SQS 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.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-lambda-sqs/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/README.adoc)
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "aws-solutions-constructs.aws-lambda-sqs",
8
- "version": "2.85.2",
8
+ "version": "2.85.3",
9
9
  "description": "CDK constructs for defining an interaction between an AWS Lambda function and an Amazon SQS 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._jsii": [
29
- "aws-lambda-sqs@2.85.2.jsii.tgz"
29
+ "aws-lambda-sqs@2.85.3.jsii.tgz"
30
30
  ],
31
31
  "aws_solutions_constructs.aws_lambda_sqs": [
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.2",
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,146 +1,5 @@
1
1
  r'''
2
- # aws-lambda-sqs module
3
-
4
- <!--BEGIN STABILITY BANNER-->---
5
-
6
-
7
- ![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
8
-
9
- ---
10
- <!--END STABILITY BANNER-->
11
-
12
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
13
- |:-------------|:-------------|
14
-
15
- <div style="height:8px"></div>
16
-
17
- | **Language** | **Package** |
18
- |:-------------|-----------------|
19
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs`|
20
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs`|
21
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqs`|
22
-
23
- ## Overview
24
-
25
- This AWS Solutions Construct implements an AWS Lambda function connected to an Amazon SQS queue.
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 { LambdaToSqs, LambdaToSqsProps } from "@aws-solutions-constructs/aws-lambda-sqs";
35
- import * as lambda from 'aws-cdk-lib/aws-lambda';
36
-
37
- new LambdaToSqs(this, 'LambdaToSqsPattern', {
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_lambda_sqs import LambdaToSqs
50
- from aws_cdk import (
51
- aws_lambda as _lambda,
52
- Stack
53
- )
54
- from constructs import Construct
55
-
56
- LambdaToSqs(
57
- self, 'test-lambda-sqs-stack',
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.lambdasqs.*;
76
-
77
- new LambdaToSqs(this, "test-lambda-sqs-stack", new LambdaToSqsProps.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)|An optional, existing Lambda function to be used instead of the default function. 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)|Optional user-provided properties to override the default properties 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 properties to override the default properties for the SQS queue.|
94
- |enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|
95
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
96
- |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.|
97
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
98
- |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.|
99
- |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.|
100
- |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`.|
101
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
102
- |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.|
103
- |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.|
104
- |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.|
105
-
106
- ## Pattern Properties
107
-
108
- | **Name** | **Type** | **Description** |
109
- |:-------------|:----------------|-----------------|
110
- |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.|
111
- |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. |
112
- |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 queue created by the pattern, if one is deployed.|
113
- |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.|
114
-
115
- ## Default settings
116
-
117
- Out of the box implementation of the Construct without any override will set the following defaults:
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
- * Allow the function to send messages only to the queue (purging can be enabled using the `enableQueuePurge` property).
124
- * Enable X-Ray Tracing
125
- * Set Environment Variables
126
-
127
- * SQS_QUEUE_URL
128
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
129
-
130
- ### Amazon SQS Queue
131
-
132
- * Deploy SQS dead-letter queue for the source SQS Queue.
133
- * Enable server-side encryption for source SQS Queue using AWS Managed KMS Key.
134
- * Enforce encryption of data in transit
135
-
136
- ## Architecture
137
-
138
- ![Architecture Diagram](architecture.png)
139
-
140
- ---
141
-
142
-
143
- © 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/README.adoc)
144
3
  '''
145
4
  from pkgutil import extend_path
146
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-lambda-sqs",
37
- "2.85.2",
37
+ "2.85.3",
38
38
  __name__[0:-6],
39
- "aws-lambda-sqs@2.85.2.jsii.tgz",
39
+ "aws-lambda-sqs@2.85.3.jsii.tgz",
40
40
  )
41
41
 
42
42
  __all__ = [
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-sqs
3
+ Version: 2.85.3
4
+ Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon SQS 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.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-lambda-sqs/README.adoc)
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_lambda_sqs.egg-info/top_level.txt
11
11
  src/aws_solutions_constructs/aws_lambda_sqs/__init__.py
12
12
  src/aws_solutions_constructs/aws_lambda_sqs/py.typed
13
13
  src/aws_solutions_constructs/aws_lambda_sqs/_jsii/__init__.py
14
- src/aws_solutions_constructs/aws_lambda_sqs/_jsii/aws-lambda-sqs@2.85.2.jsii.tgz
14
+ src/aws_solutions_constructs/aws_lambda_sqs/_jsii/aws-lambda-sqs@2.85.3.jsii.tgz
@@ -1,5 +1,5 @@
1
1
  aws-cdk-lib<3.0.0,>=2.193.0
2
- aws-solutions-constructs.core==2.85.2
2
+ aws-solutions-constructs.core==2.85.3
3
3
  constructs<11.0.0,>=10.0.0
4
4
  jsii<2.0.0,>=1.111.0
5
5
  publication>=0.0.3
@@ -1,169 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-lambda-sqs
3
- Version: 2.85.2
4
- Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon SQS 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.core==2.85.2
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-lambda-sqs module
29
-
30
- <!--BEGIN STABILITY BANNER-->---
31
-
32
-
33
- ![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
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 Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs`|
46
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs`|
47
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqs`|
48
-
49
- ## Overview
50
-
51
- This AWS Solutions Construct implements an AWS Lambda function connected to an Amazon SQS queue.
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 { LambdaToSqs, LambdaToSqsProps } from "@aws-solutions-constructs/aws-lambda-sqs";
61
- import * as lambda from 'aws-cdk-lib/aws-lambda';
62
-
63
- new LambdaToSqs(this, 'LambdaToSqsPattern', {
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_lambda_sqs import LambdaToSqs
76
- from aws_cdk import (
77
- aws_lambda as _lambda,
78
- Stack
79
- )
80
- from constructs import Construct
81
-
82
- LambdaToSqs(
83
- self, 'test-lambda-sqs-stack',
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.lambdasqs.*;
102
-
103
- new LambdaToSqs(this, "test-lambda-sqs-stack", new LambdaToSqsProps.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)|An optional, existing Lambda function to be used instead of the default function. 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)|Optional user-provided properties to override the default properties 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 properties to override the default properties for the SQS queue.|
120
- |enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|
121
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
122
- |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.|
123
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
124
- |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.|
125
- |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.|
126
- |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`.|
127
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
128
- |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.|
129
- |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.|
130
- |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.|
131
-
132
- ## Pattern Properties
133
-
134
- | **Name** | **Type** | **Description** |
135
- |:-------------|:----------------|-----------------|
136
- |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.|
137
- |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. |
138
- |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 queue created by the pattern, if one is deployed.|
139
- |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.|
140
-
141
- ## Default settings
142
-
143
- Out of the box implementation of the Construct without any override will set the following defaults:
144
-
145
- ### AWS Lambda Function
146
-
147
- * Configure limited privilege access IAM role for Lambda function.
148
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function.
149
- * Allow the function to send messages only to the queue (purging can be enabled using the `enableQueuePurge` property).
150
- * Enable X-Ray Tracing
151
- * Set Environment Variables
152
-
153
- * SQS_QUEUE_URL
154
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
155
-
156
- ### Amazon SQS Queue
157
-
158
- * Deploy SQS dead-letter queue for the source SQS Queue.
159
- * Enable server-side encryption for source SQS Queue using AWS Managed KMS Key.
160
- * Enforce encryption of data in transit
161
-
162
- ## Architecture
163
-
164
- ![Architecture Diagram](architecture.png)
165
-
166
- ---
167
-
168
-
169
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,142 +0,0 @@
1
- # aws-lambda-sqs module
2
-
3
- <!--BEGIN STABILITY BANNER-->---
4
-
5
-
6
- ![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
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 Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs`|
19
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs`|
20
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqs`|
21
-
22
- ## Overview
23
-
24
- This AWS Solutions Construct implements an AWS Lambda function connected to an Amazon SQS queue.
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 { LambdaToSqs, LambdaToSqsProps } from "@aws-solutions-constructs/aws-lambda-sqs";
34
- import * as lambda from 'aws-cdk-lib/aws-lambda';
35
-
36
- new LambdaToSqs(this, 'LambdaToSqsPattern', {
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_lambda_sqs import LambdaToSqs
49
- from aws_cdk import (
50
- aws_lambda as _lambda,
51
- Stack
52
- )
53
- from constructs import Construct
54
-
55
- LambdaToSqs(
56
- self, 'test-lambda-sqs-stack',
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.lambdasqs.*;
75
-
76
- new LambdaToSqs(this, "test-lambda-sqs-stack", new LambdaToSqsProps.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)|An optional, existing Lambda function to be used instead of the default function. Providing both this and `lambdaFunctionProps` will cause an error.|
90
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|Optional user-provided properties to override the default properties 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 properties to override the default properties for the SQS queue.|
93
- |enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|
94
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
95
- |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.|
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
- |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.|
98
- |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.|
99
- |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`.|
100
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
101
- |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.|
102
- |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.|
103
- |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.|
104
-
105
- ## Pattern Properties
106
-
107
- | **Name** | **Type** | **Description** |
108
- |:-------------|:----------------|-----------------|
109
- |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.|
110
- |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. |
111
- |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 queue created by the pattern, if one is deployed.|
112
- |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.|
113
-
114
- ## Default settings
115
-
116
- Out of the box implementation of the Construct without any override will set the following defaults:
117
-
118
- ### AWS Lambda Function
119
-
120
- * Configure limited privilege access IAM role for Lambda function.
121
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function.
122
- * Allow the function to send messages only to the queue (purging can be enabled using the `enableQueuePurge` property).
123
- * Enable X-Ray Tracing
124
- * Set Environment Variables
125
-
126
- * SQS_QUEUE_URL
127
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
128
-
129
- ### Amazon SQS Queue
130
-
131
- * Deploy SQS dead-letter queue for the source SQS Queue.
132
- * Enable server-side encryption for source SQS Queue using AWS Managed KMS Key.
133
- * Enforce encryption of data in transit
134
-
135
- ## Architecture
136
-
137
- ![Architecture Diagram](architecture.png)
138
-
139
- ---
140
-
141
-
142
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,169 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-lambda-sqs
3
- Version: 2.85.2
4
- Summary: CDK constructs for defining an interaction between an AWS Lambda function and an Amazon SQS 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.core==2.85.2
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-lambda-sqs module
29
-
30
- <!--BEGIN STABILITY BANNER-->---
31
-
32
-
33
- ![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
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 Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_sqs`|
46
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-sqs`|
47
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasqs`|
48
-
49
- ## Overview
50
-
51
- This AWS Solutions Construct implements an AWS Lambda function connected to an Amazon SQS queue.
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 { LambdaToSqs, LambdaToSqsProps } from "@aws-solutions-constructs/aws-lambda-sqs";
61
- import * as lambda from 'aws-cdk-lib/aws-lambda';
62
-
63
- new LambdaToSqs(this, 'LambdaToSqsPattern', {
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_lambda_sqs import LambdaToSqs
76
- from aws_cdk import (
77
- aws_lambda as _lambda,
78
- Stack
79
- )
80
- from constructs import Construct
81
-
82
- LambdaToSqs(
83
- self, 'test-lambda-sqs-stack',
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.lambdasqs.*;
102
-
103
- new LambdaToSqs(this, "test-lambda-sqs-stack", new LambdaToSqsProps.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)|An optional, existing Lambda function to be used instead of the default function. 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)|Optional user-provided properties to override the default properties 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 properties to override the default properties for the SQS queue.|
120
- |enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|
121
- |deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|
122
- |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.|
123
- |maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|
124
- |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.|
125
- |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.|
126
- |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`.|
127
- |queueEnvironmentVariableName?|`string`|Optional Name for the Lambda function environment variable set to the URL of the queue. Default: SQS_QUEUE_URL |
128
- |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.|
129
- |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.|
130
- |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.|
131
-
132
- ## Pattern Properties
133
-
134
- | **Name** | **Type** | **Description** |
135
- |:-------------|:----------------|-----------------|
136
- |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.|
137
- |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. |
138
- |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 queue created by the pattern, if one is deployed.|
139
- |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.|
140
-
141
- ## Default settings
142
-
143
- Out of the box implementation of the Construct without any override will set the following defaults:
144
-
145
- ### AWS Lambda Function
146
-
147
- * Configure limited privilege access IAM role for Lambda function.
148
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function.
149
- * Allow the function to send messages only to the queue (purging can be enabled using the `enableQueuePurge` property).
150
- * Enable X-Ray Tracing
151
- * Set Environment Variables
152
-
153
- * SQS_QUEUE_URL
154
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
155
-
156
- ### Amazon SQS Queue
157
-
158
- * Deploy SQS dead-letter queue for the source SQS Queue.
159
- * Enable server-side encryption for source SQS Queue using AWS Managed KMS Key.
160
- * Enforce encryption of data in transit
161
-
162
- ## Architecture
163
-
164
- ![Architecture Diagram](architecture.png)
165
-
166
- ---
167
-
168
-
169
- © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.