aws-solutions-constructs.aws-sqs-lambda 1.114.0__tar.gz → 2.95.1__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.95.1/PKG-INFO +28 -0
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/README.md +1 -0
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/pyproject.toml +9 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/setup.py +11 -15
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/src/aws_solutions_constructs/aws_sqs_lambda/__init__.py +387 -0
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/__init__.py +46 -0
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@2.95.1.jsii.tgz +0 -0
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/PKG-INFO +28 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/SOURCES.txt +1 -1
- aws_solutions_constructs_aws_sqs_lambda-2.95.1/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/requires.txt +6 -0
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/PKG-INFO +0 -123
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/README.md +0 -101
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/pyproject.toml +0 -3
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/src/aws_solutions_constructs/aws_sqs_lambda/__init__.py +0 -348
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/__init__.py +0 -30
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@1.114.0.jsii.tgz +0 -0
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/PKG-INFO +0 -123
- aws-solutions-constructs.aws-sqs-lambda-1.114.0/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/requires.txt +0 -9
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/LICENSE +0 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/MANIFEST.in +0 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/setup.cfg +0 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/src/aws_solutions_constructs/aws_sqs_lambda/py.typed +0 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/src/aws_solutions_constructs.aws_sqs_lambda.egg-info/dependency_links.txt +0 -0
- {aws-solutions-constructs.aws-sqs-lambda-1.114.0 → aws_solutions_constructs_aws_sqs_lambda-2.95.1}/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.95.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.223.0
|
|
22
|
+
Requires-Dist: aws-solutions-constructs.core==2.95.1
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.119.0
|
|
25
|
+
Requires-Dist: publication>=0.0.3
|
|
26
|
+
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
+
|
|
28
|
+
Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-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": "
|
|
8
|
+
"version": "2.95.1",
|
|
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,33 +26,29 @@ kwargs = json.loads(
|
|
|
26
26
|
],
|
|
27
27
|
"package_data": {
|
|
28
28
|
"aws_solutions_constructs.aws_sqs_lambda._jsii": [
|
|
29
|
-
"aws-sqs-lambda@
|
|
29
|
+
"aws-sqs-lambda@2.95.1.jsii.tgz"
|
|
30
30
|
],
|
|
31
31
|
"aws_solutions_constructs.aws_sqs_lambda": [
|
|
32
32
|
"py.typed"
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
|
-
"python_requires": "
|
|
35
|
+
"python_requires": "~=3.9",
|
|
36
36
|
"install_requires": [
|
|
37
|
-
"aws-cdk
|
|
38
|
-
"aws-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"constructs>=3.2.0, <4.0.0",
|
|
44
|
-
"jsii>=1.32.0, <2.0.0",
|
|
45
|
-
"publication>=0.0.3"
|
|
37
|
+
"aws-cdk-lib>=2.223.0, <3.0.0",
|
|
38
|
+
"aws-solutions-constructs.core==2.95.1",
|
|
39
|
+
"constructs>=10.0.0, <11.0.0",
|
|
40
|
+
"jsii>=1.119.0, <2.0.0",
|
|
41
|
+
"publication>=0.0.3",
|
|
42
|
+
"typeguard>=2.13.3,<4.3.0"
|
|
46
43
|
],
|
|
47
44
|
"classifiers": [
|
|
48
45
|
"Intended Audience :: Developers",
|
|
49
46
|
"Operating System :: OS Independent",
|
|
50
47
|
"Programming Language :: JavaScript",
|
|
51
48
|
"Programming Language :: Python :: 3 :: Only",
|
|
52
|
-
"Programming Language :: Python :: 3.6",
|
|
53
|
-
"Programming Language :: Python :: 3.7",
|
|
54
|
-
"Programming Language :: Python :: 3.8",
|
|
55
49
|
"Programming Language :: Python :: 3.9",
|
|
50
|
+
"Programming Language :: Python :: 3.10",
|
|
51
|
+
"Programming Language :: Python :: 3.11",
|
|
56
52
|
"Typing :: Typed",
|
|
57
53
|
"License :: OSI Approved"
|
|
58
54
|
],
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
r'''
|
|
2
|
+
Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-sqs-lambda/README.adoc)
|
|
3
|
+
'''
|
|
4
|
+
from pkgutil import extend_path
|
|
5
|
+
__path__ = extend_path(__path__, __name__)
|
|
6
|
+
|
|
7
|
+
import abc
|
|
8
|
+
import builtins
|
|
9
|
+
import datetime
|
|
10
|
+
import enum
|
|
11
|
+
import typing
|
|
12
|
+
|
|
13
|
+
import jsii
|
|
14
|
+
import publication
|
|
15
|
+
import typing_extensions
|
|
16
|
+
|
|
17
|
+
import typeguard
|
|
18
|
+
from importlib.metadata import version as _metadata_package_version
|
|
19
|
+
TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
|
|
20
|
+
|
|
21
|
+
def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
|
|
22
|
+
if TYPEGUARD_MAJOR_VERSION <= 2:
|
|
23
|
+
return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
|
|
24
|
+
else:
|
|
25
|
+
if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
|
|
26
|
+
pass
|
|
27
|
+
else:
|
|
28
|
+
if TYPEGUARD_MAJOR_VERSION == 3:
|
|
29
|
+
typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
|
|
30
|
+
typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
|
|
31
|
+
else:
|
|
32
|
+
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
|
|
33
|
+
|
|
34
|
+
from ._jsii import *
|
|
35
|
+
|
|
36
|
+
import aws_cdk.aws_kms as _aws_cdk_aws_kms_ceddda9d
|
|
37
|
+
import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
|
|
38
|
+
import aws_cdk.aws_lambda_event_sources as _aws_cdk_aws_lambda_event_sources_ceddda9d
|
|
39
|
+
import aws_cdk.aws_sqs as _aws_cdk_aws_sqs_ceddda9d
|
|
40
|
+
import constructs as _constructs_77d1e7e8
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class SqsToLambda(
|
|
44
|
+
_constructs_77d1e7e8.Construct,
|
|
45
|
+
metaclass=jsii.JSIIMeta,
|
|
46
|
+
jsii_type="@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda",
|
|
47
|
+
):
|
|
48
|
+
'''
|
|
49
|
+
:summary: The SqsToLambda class.
|
|
50
|
+
'''
|
|
51
|
+
|
|
52
|
+
def __init__(
|
|
53
|
+
self,
|
|
54
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
55
|
+
id: builtins.str,
|
|
56
|
+
*,
|
|
57
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
58
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
|
59
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
|
60
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
|
61
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
62
|
+
existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
|
|
63
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
|
64
|
+
lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
65
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
|
66
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
67
|
+
sqs_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
68
|
+
) -> None:
|
|
69
|
+
'''
|
|
70
|
+
:param scope: - represents the scope for all the resources.
|
|
71
|
+
:param id: - this is a a scope-unique id.
|
|
72
|
+
:param dead_letter_queue_props: Optional user provided properties for the dead letter queue. Default: - Default props are used
|
|
73
|
+
:param deploy_dead_letter_queue: Whether to deploy a secondary queue to be used as a dead letter queue. Default: - true.
|
|
74
|
+
:param enable_encryption_with_customer_managed_key: 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. Default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.
|
|
75
|
+
:param encryption_key: An optional, imported encryption key to encrypt the SQS queue with. Default: - None
|
|
76
|
+
:param encryption_key_props: Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with. Default: - None
|
|
77
|
+
:param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
|
|
78
|
+
:param existing_queue_obj: Existing instance of SQS queue object, Providing both this and queueProps will cause an error. Default: - Default props are used
|
|
79
|
+
:param lambda_function_props: User provided props to override the default props for the Lambda function. Default: - Default properties are used.
|
|
80
|
+
:param max_receive_count: The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Default: - required field if deployDeadLetterQueue=true.
|
|
81
|
+
:param queue_props: Optional user provided properties. Default: - Default props are used
|
|
82
|
+
:param sqs_event_source_props: Optional user provided properties for the queue event source. Default: - Default props are used
|
|
83
|
+
|
|
84
|
+
:access: public
|
|
85
|
+
:since: 0.8.0
|
|
86
|
+
:summary: Constructs a new instance of the SqsToLambda class.
|
|
87
|
+
'''
|
|
88
|
+
if __debug__:
|
|
89
|
+
type_hints = typing.get_type_hints(_typecheckingstub__e5cd02a76213f570c0a01eb9a352463df543a85b0d9ad4dbfbceff175d627cc9)
|
|
90
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
91
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
92
|
+
props = SqsToLambdaProps(
|
|
93
|
+
dead_letter_queue_props=dead_letter_queue_props,
|
|
94
|
+
deploy_dead_letter_queue=deploy_dead_letter_queue,
|
|
95
|
+
enable_encryption_with_customer_managed_key=enable_encryption_with_customer_managed_key,
|
|
96
|
+
encryption_key=encryption_key,
|
|
97
|
+
encryption_key_props=encryption_key_props,
|
|
98
|
+
existing_lambda_obj=existing_lambda_obj,
|
|
99
|
+
existing_queue_obj=existing_queue_obj,
|
|
100
|
+
lambda_function_props=lambda_function_props,
|
|
101
|
+
max_receive_count=max_receive_count,
|
|
102
|
+
queue_props=queue_props,
|
|
103
|
+
sqs_event_source_props=sqs_event_source_props,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
jsii.create(self.__class__, self, [scope, id, props])
|
|
107
|
+
|
|
108
|
+
@builtins.property
|
|
109
|
+
@jsii.member(jsii_name="lambdaFunction")
|
|
110
|
+
def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
|
|
111
|
+
return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
|
|
112
|
+
|
|
113
|
+
@builtins.property
|
|
114
|
+
@jsii.member(jsii_name="sqsQueue")
|
|
115
|
+
def sqs_queue(self) -> _aws_cdk_aws_sqs_ceddda9d.Queue:
|
|
116
|
+
return typing.cast(_aws_cdk_aws_sqs_ceddda9d.Queue, jsii.get(self, "sqsQueue"))
|
|
117
|
+
|
|
118
|
+
@builtins.property
|
|
119
|
+
@jsii.member(jsii_name="deadLetterQueue")
|
|
120
|
+
def dead_letter_queue(
|
|
121
|
+
self,
|
|
122
|
+
) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.DeadLetterQueue]:
|
|
123
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.DeadLetterQueue], jsii.get(self, "deadLetterQueue"))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@jsii.data_type(
|
|
127
|
+
jsii_type="@aws-solutions-constructs/aws-sqs-lambda.SqsToLambdaProps",
|
|
128
|
+
jsii_struct_bases=[],
|
|
129
|
+
name_mapping={
|
|
130
|
+
"dead_letter_queue_props": "deadLetterQueueProps",
|
|
131
|
+
"deploy_dead_letter_queue": "deployDeadLetterQueue",
|
|
132
|
+
"enable_encryption_with_customer_managed_key": "enableEncryptionWithCustomerManagedKey",
|
|
133
|
+
"encryption_key": "encryptionKey",
|
|
134
|
+
"encryption_key_props": "encryptionKeyProps",
|
|
135
|
+
"existing_lambda_obj": "existingLambdaObj",
|
|
136
|
+
"existing_queue_obj": "existingQueueObj",
|
|
137
|
+
"lambda_function_props": "lambdaFunctionProps",
|
|
138
|
+
"max_receive_count": "maxReceiveCount",
|
|
139
|
+
"queue_props": "queueProps",
|
|
140
|
+
"sqs_event_source_props": "sqsEventSourceProps",
|
|
141
|
+
},
|
|
142
|
+
)
|
|
143
|
+
class SqsToLambdaProps:
|
|
144
|
+
def __init__(
|
|
145
|
+
self,
|
|
146
|
+
*,
|
|
147
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
148
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
|
149
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
|
150
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
|
151
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
152
|
+
existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
|
|
153
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
|
154
|
+
lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
155
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
|
156
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
157
|
+
sqs_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
158
|
+
) -> None:
|
|
159
|
+
'''
|
|
160
|
+
:param dead_letter_queue_props: Optional user provided properties for the dead letter queue. Default: - Default props are used
|
|
161
|
+
:param deploy_dead_letter_queue: Whether to deploy a secondary queue to be used as a dead letter queue. Default: - true.
|
|
162
|
+
:param enable_encryption_with_customer_managed_key: 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. Default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.
|
|
163
|
+
:param encryption_key: An optional, imported encryption key to encrypt the SQS queue with. Default: - None
|
|
164
|
+
:param encryption_key_props: Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with. Default: - None
|
|
165
|
+
:param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
|
|
166
|
+
:param existing_queue_obj: Existing instance of SQS queue object, Providing both this and queueProps will cause an error. Default: - Default props are used
|
|
167
|
+
:param lambda_function_props: User provided props to override the default props for the Lambda function. Default: - Default properties are used.
|
|
168
|
+
:param max_receive_count: The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Default: - required field if deployDeadLetterQueue=true.
|
|
169
|
+
:param queue_props: Optional user provided properties. Default: - Default props are used
|
|
170
|
+
:param sqs_event_source_props: Optional user provided properties for the queue event source. Default: - Default props are used
|
|
171
|
+
|
|
172
|
+
:summary: The properties for the SqsToLambda class.
|
|
173
|
+
'''
|
|
174
|
+
if isinstance(dead_letter_queue_props, dict):
|
|
175
|
+
dead_letter_queue_props = _aws_cdk_aws_sqs_ceddda9d.QueueProps(**dead_letter_queue_props)
|
|
176
|
+
if isinstance(encryption_key_props, dict):
|
|
177
|
+
encryption_key_props = _aws_cdk_aws_kms_ceddda9d.KeyProps(**encryption_key_props)
|
|
178
|
+
if isinstance(lambda_function_props, dict):
|
|
179
|
+
lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
|
|
180
|
+
if isinstance(queue_props, dict):
|
|
181
|
+
queue_props = _aws_cdk_aws_sqs_ceddda9d.QueueProps(**queue_props)
|
|
182
|
+
if isinstance(sqs_event_source_props, dict):
|
|
183
|
+
sqs_event_source_props = _aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps(**sqs_event_source_props)
|
|
184
|
+
if __debug__:
|
|
185
|
+
type_hints = typing.get_type_hints(_typecheckingstub__296bcaf099d43350c286f7bf502971424313f0fa6293d41a60f0a096f4912cb4)
|
|
186
|
+
check_type(argname="argument dead_letter_queue_props", value=dead_letter_queue_props, expected_type=type_hints["dead_letter_queue_props"])
|
|
187
|
+
check_type(argname="argument deploy_dead_letter_queue", value=deploy_dead_letter_queue, expected_type=type_hints["deploy_dead_letter_queue"])
|
|
188
|
+
check_type(argname="argument enable_encryption_with_customer_managed_key", value=enable_encryption_with_customer_managed_key, expected_type=type_hints["enable_encryption_with_customer_managed_key"])
|
|
189
|
+
check_type(argname="argument encryption_key", value=encryption_key, expected_type=type_hints["encryption_key"])
|
|
190
|
+
check_type(argname="argument encryption_key_props", value=encryption_key_props, expected_type=type_hints["encryption_key_props"])
|
|
191
|
+
check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
|
|
192
|
+
check_type(argname="argument existing_queue_obj", value=existing_queue_obj, expected_type=type_hints["existing_queue_obj"])
|
|
193
|
+
check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
|
|
194
|
+
check_type(argname="argument max_receive_count", value=max_receive_count, expected_type=type_hints["max_receive_count"])
|
|
195
|
+
check_type(argname="argument queue_props", value=queue_props, expected_type=type_hints["queue_props"])
|
|
196
|
+
check_type(argname="argument sqs_event_source_props", value=sqs_event_source_props, expected_type=type_hints["sqs_event_source_props"])
|
|
197
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
198
|
+
if dead_letter_queue_props is not None:
|
|
199
|
+
self._values["dead_letter_queue_props"] = dead_letter_queue_props
|
|
200
|
+
if deploy_dead_letter_queue is not None:
|
|
201
|
+
self._values["deploy_dead_letter_queue"] = deploy_dead_letter_queue
|
|
202
|
+
if enable_encryption_with_customer_managed_key is not None:
|
|
203
|
+
self._values["enable_encryption_with_customer_managed_key"] = enable_encryption_with_customer_managed_key
|
|
204
|
+
if encryption_key is not None:
|
|
205
|
+
self._values["encryption_key"] = encryption_key
|
|
206
|
+
if encryption_key_props is not None:
|
|
207
|
+
self._values["encryption_key_props"] = encryption_key_props
|
|
208
|
+
if existing_lambda_obj is not None:
|
|
209
|
+
self._values["existing_lambda_obj"] = existing_lambda_obj
|
|
210
|
+
if existing_queue_obj is not None:
|
|
211
|
+
self._values["existing_queue_obj"] = existing_queue_obj
|
|
212
|
+
if lambda_function_props is not None:
|
|
213
|
+
self._values["lambda_function_props"] = lambda_function_props
|
|
214
|
+
if max_receive_count is not None:
|
|
215
|
+
self._values["max_receive_count"] = max_receive_count
|
|
216
|
+
if queue_props is not None:
|
|
217
|
+
self._values["queue_props"] = queue_props
|
|
218
|
+
if sqs_event_source_props is not None:
|
|
219
|
+
self._values["sqs_event_source_props"] = sqs_event_source_props
|
|
220
|
+
|
|
221
|
+
@builtins.property
|
|
222
|
+
def dead_letter_queue_props(
|
|
223
|
+
self,
|
|
224
|
+
) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps]:
|
|
225
|
+
'''Optional user provided properties for the dead letter queue.
|
|
226
|
+
|
|
227
|
+
:default: - Default props are used
|
|
228
|
+
'''
|
|
229
|
+
result = self._values.get("dead_letter_queue_props")
|
|
230
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps], result)
|
|
231
|
+
|
|
232
|
+
@builtins.property
|
|
233
|
+
def deploy_dead_letter_queue(self) -> typing.Optional[builtins.bool]:
|
|
234
|
+
'''Whether to deploy a secondary queue to be used as a dead letter queue.
|
|
235
|
+
|
|
236
|
+
:default: - true.
|
|
237
|
+
'''
|
|
238
|
+
result = self._values.get("deploy_dead_letter_queue")
|
|
239
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
240
|
+
|
|
241
|
+
@builtins.property
|
|
242
|
+
def enable_encryption_with_customer_managed_key(
|
|
243
|
+
self,
|
|
244
|
+
) -> typing.Optional[builtins.bool]:
|
|
245
|
+
'''If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key.
|
|
246
|
+
|
|
247
|
+
This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.
|
|
248
|
+
|
|
249
|
+
:default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.
|
|
250
|
+
'''
|
|
251
|
+
result = self._values.get("enable_encryption_with_customer_managed_key")
|
|
252
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
253
|
+
|
|
254
|
+
@builtins.property
|
|
255
|
+
def encryption_key(self) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key]:
|
|
256
|
+
'''An optional, imported encryption key to encrypt the SQS queue with.
|
|
257
|
+
|
|
258
|
+
:default: - None
|
|
259
|
+
'''
|
|
260
|
+
result = self._values.get("encryption_key")
|
|
261
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key], result)
|
|
262
|
+
|
|
263
|
+
@builtins.property
|
|
264
|
+
def encryption_key_props(
|
|
265
|
+
self,
|
|
266
|
+
) -> typing.Optional[_aws_cdk_aws_kms_ceddda9d.KeyProps]:
|
|
267
|
+
'''Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.
|
|
268
|
+
|
|
269
|
+
:default: - None
|
|
270
|
+
'''
|
|
271
|
+
result = self._values.get("encryption_key_props")
|
|
272
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_kms_ceddda9d.KeyProps], result)
|
|
273
|
+
|
|
274
|
+
@builtins.property
|
|
275
|
+
def existing_lambda_obj(
|
|
276
|
+
self,
|
|
277
|
+
) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
|
|
278
|
+
'''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
|
|
279
|
+
|
|
280
|
+
:default: - None
|
|
281
|
+
'''
|
|
282
|
+
result = self._values.get("existing_lambda_obj")
|
|
283
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
|
|
284
|
+
|
|
285
|
+
@builtins.property
|
|
286
|
+
def existing_queue_obj(self) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue]:
|
|
287
|
+
'''Existing instance of SQS queue object, Providing both this and queueProps will cause an error.
|
|
288
|
+
|
|
289
|
+
:default: - Default props are used
|
|
290
|
+
'''
|
|
291
|
+
result = self._values.get("existing_queue_obj")
|
|
292
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue], result)
|
|
293
|
+
|
|
294
|
+
@builtins.property
|
|
295
|
+
def lambda_function_props(
|
|
296
|
+
self,
|
|
297
|
+
) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
|
|
298
|
+
'''User provided props to override the default props for the Lambda function.
|
|
299
|
+
|
|
300
|
+
:default: - Default properties are used.
|
|
301
|
+
'''
|
|
302
|
+
result = self._values.get("lambda_function_props")
|
|
303
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
|
|
304
|
+
|
|
305
|
+
@builtins.property
|
|
306
|
+
def max_receive_count(self) -> typing.Optional[jsii.Number]:
|
|
307
|
+
'''The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.
|
|
308
|
+
|
|
309
|
+
:default: - required field if deployDeadLetterQueue=true.
|
|
310
|
+
'''
|
|
311
|
+
result = self._values.get("max_receive_count")
|
|
312
|
+
return typing.cast(typing.Optional[jsii.Number], result)
|
|
313
|
+
|
|
314
|
+
@builtins.property
|
|
315
|
+
def queue_props(self) -> typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps]:
|
|
316
|
+
'''Optional user provided properties.
|
|
317
|
+
|
|
318
|
+
:default: - Default props are used
|
|
319
|
+
'''
|
|
320
|
+
result = self._values.get("queue_props")
|
|
321
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_sqs_ceddda9d.QueueProps], result)
|
|
322
|
+
|
|
323
|
+
@builtins.property
|
|
324
|
+
def sqs_event_source_props(
|
|
325
|
+
self,
|
|
326
|
+
) -> typing.Optional[_aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps]:
|
|
327
|
+
'''Optional user provided properties for the queue event source.
|
|
328
|
+
|
|
329
|
+
:default: - Default props are used
|
|
330
|
+
'''
|
|
331
|
+
result = self._values.get("sqs_event_source_props")
|
|
332
|
+
return typing.cast(typing.Optional[_aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps], result)
|
|
333
|
+
|
|
334
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
335
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
336
|
+
|
|
337
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
338
|
+
return not (rhs == self)
|
|
339
|
+
|
|
340
|
+
def __repr__(self) -> str:
|
|
341
|
+
return "SqsToLambdaProps(%s)" % ", ".join(
|
|
342
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
__all__ = [
|
|
347
|
+
"SqsToLambda",
|
|
348
|
+
"SqsToLambdaProps",
|
|
349
|
+
]
|
|
350
|
+
|
|
351
|
+
publication.publish()
|
|
352
|
+
|
|
353
|
+
def _typecheckingstub__e5cd02a76213f570c0a01eb9a352463df543a85b0d9ad4dbfbceff175d627cc9(
|
|
354
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
355
|
+
id: builtins.str,
|
|
356
|
+
*,
|
|
357
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
358
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
|
359
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
|
360
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
|
361
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
362
|
+
existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
|
|
363
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
|
364
|
+
lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
365
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
|
366
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
367
|
+
sqs_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
368
|
+
) -> None:
|
|
369
|
+
"""Type checking stubs"""
|
|
370
|
+
pass
|
|
371
|
+
|
|
372
|
+
def _typecheckingstub__296bcaf099d43350c286f7bf502971424313f0fa6293d41a60f0a096f4912cb4(
|
|
373
|
+
*,
|
|
374
|
+
dead_letter_queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
375
|
+
deploy_dead_letter_queue: typing.Optional[builtins.bool] = None,
|
|
376
|
+
enable_encryption_with_customer_managed_key: typing.Optional[builtins.bool] = None,
|
|
377
|
+
encryption_key: typing.Optional[_aws_cdk_aws_kms_ceddda9d.Key] = None,
|
|
378
|
+
encryption_key_props: typing.Optional[typing.Union[_aws_cdk_aws_kms_ceddda9d.KeyProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
379
|
+
existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
|
|
380
|
+
existing_queue_obj: typing.Optional[_aws_cdk_aws_sqs_ceddda9d.Queue] = None,
|
|
381
|
+
lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
382
|
+
max_receive_count: typing.Optional[jsii.Number] = None,
|
|
383
|
+
queue_props: typing.Optional[typing.Union[_aws_cdk_aws_sqs_ceddda9d.QueueProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
384
|
+
sqs_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.SqsEventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
385
|
+
) -> None:
|
|
386
|
+
"""Type checking stubs"""
|
|
387
|
+
pass
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from pkgutil import extend_path
|
|
2
|
+
__path__ = extend_path(__path__, __name__)
|
|
3
|
+
|
|
4
|
+
import abc
|
|
5
|
+
import builtins
|
|
6
|
+
import datetime
|
|
7
|
+
import enum
|
|
8
|
+
import typing
|
|
9
|
+
|
|
10
|
+
import jsii
|
|
11
|
+
import publication
|
|
12
|
+
import typing_extensions
|
|
13
|
+
|
|
14
|
+
import typeguard
|
|
15
|
+
from importlib.metadata import version as _metadata_package_version
|
|
16
|
+
TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
|
|
17
|
+
|
|
18
|
+
def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
|
|
19
|
+
if TYPEGUARD_MAJOR_VERSION <= 2:
|
|
20
|
+
return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
|
|
21
|
+
else:
|
|
22
|
+
if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
|
|
23
|
+
pass
|
|
24
|
+
else:
|
|
25
|
+
if TYPEGUARD_MAJOR_VERSION == 3:
|
|
26
|
+
typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
|
|
27
|
+
typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
|
|
28
|
+
else:
|
|
29
|
+
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
|
|
30
|
+
|
|
31
|
+
import aws_cdk._jsii
|
|
32
|
+
import aws_solutions_constructs.core._jsii
|
|
33
|
+
import constructs._jsii
|
|
34
|
+
|
|
35
|
+
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
36
|
+
"@aws-solutions-constructs/aws-sqs-lambda",
|
|
37
|
+
"2.95.1",
|
|
38
|
+
__name__[0:-6],
|
|
39
|
+
"aws-sqs-lambda@2.95.1.jsii.tgz",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
__all__ = [
|
|
43
|
+
"__jsii_assembly__",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
publication.publish()
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aws-solutions-constructs.aws-sqs-lambda
|
|
3
|
+
Version: 2.95.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.223.0
|
|
22
|
+
Requires-Dist: aws-solutions-constructs.core==2.95.1
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.0.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.119.0
|
|
25
|
+
Requires-Dist: publication>=0.0.3
|
|
26
|
+
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
|
27
|
+
|
|
28
|
+
Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-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@
|
|
14
|
+
src/aws_solutions_constructs/aws_sqs_lambda/_jsii/aws-sqs-lambda@2.95.1.jsii.tgz
|