aws-solutions-constructs.aws-s3-lambda 1.109.0__tar.gz → 2.92.2__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 (24) hide show
  1. aws_solutions_constructs_aws_s3_lambda-2.92.2/PKG-INFO +28 -0
  2. aws_solutions_constructs_aws_s3_lambda-2.92.2/README.md +1 -0
  3. aws_solutions_constructs_aws_s3_lambda-2.92.2/pyproject.toml +9 -0
  4. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/setup.py +11 -16
  5. aws_solutions_constructs_aws_s3_lambda-2.92.2/src/aws_solutions_constructs/aws_s3_lambda/__init__.py +299 -0
  6. aws_solutions_constructs_aws_s3_lambda-2.92.2/src/aws_solutions_constructs/aws_s3_lambda/_jsii/__init__.py +46 -0
  7. aws_solutions_constructs_aws_s3_lambda-2.92.2/src/aws_solutions_constructs/aws_s3_lambda/_jsii/aws-s3-lambda@2.92.2.jsii.tgz +0 -0
  8. aws_solutions_constructs_aws_s3_lambda-2.92.2/src/aws_solutions_constructs.aws_s3_lambda.egg-info/PKG-INFO +28 -0
  9. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/src/aws_solutions_constructs.aws_s3_lambda.egg-info/SOURCES.txt +1 -1
  10. aws_solutions_constructs_aws_s3_lambda-2.92.2/src/aws_solutions_constructs.aws_s3_lambda.egg-info/requires.txt +6 -0
  11. aws-solutions-constructs.aws-s3-lambda-1.109.0/PKG-INFO +0 -125
  12. aws-solutions-constructs.aws-s3-lambda-1.109.0/README.md +0 -103
  13. aws-solutions-constructs.aws-s3-lambda-1.109.0/pyproject.toml +0 -3
  14. aws-solutions-constructs.aws-s3-lambda-1.109.0/src/aws_solutions_constructs/aws_s3_lambda/__init__.py +0 -293
  15. aws-solutions-constructs.aws-s3-lambda-1.109.0/src/aws_solutions_constructs/aws_s3_lambda/_jsii/__init__.py +0 -31
  16. aws-solutions-constructs.aws-s3-lambda-1.109.0/src/aws_solutions_constructs/aws_s3_lambda/_jsii/aws-s3-lambda@1.109.0.jsii.tgz +0 -0
  17. aws-solutions-constructs.aws-s3-lambda-1.109.0/src/aws_solutions_constructs.aws_s3_lambda.egg-info/PKG-INFO +0 -125
  18. aws-solutions-constructs.aws-s3-lambda-1.109.0/src/aws_solutions_constructs.aws_s3_lambda.egg-info/requires.txt +0 -10
  19. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/LICENSE +0 -0
  20. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/MANIFEST.in +0 -0
  21. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/setup.cfg +0 -0
  22. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/src/aws_solutions_constructs/aws_s3_lambda/py.typed +0 -0
  23. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/src/aws_solutions_constructs.aws_s3_lambda.egg-info/dependency_links.txt +0 -0
  24. {aws-solutions-constructs.aws-s3-lambda-1.109.0 → aws_solutions_constructs_aws_s3_lambda-2.92.2}/src/aws_solutions_constructs.aws_s3_lambda.egg-info/top_level.txt +0 -0
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-s3-lambda
3
+ Version: 2.92.2
4
+ Summary: CDK Constructs for AWS S3 to AWS Lambda integration
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.214.0
22
+ Requires-Dist: aws-solutions-constructs.core==2.92.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
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-s3-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-s3-lambda/README.adoc)
@@ -0,0 +1,9 @@
1
+ [build-system]
2
+ requires = ["setuptools~=75.3.2", "wheel~=0.42"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.pyright]
6
+ defineConstant = { DEBUG = true }
7
+ pythonVersion = "3.9"
8
+ pythonPlatform = "All"
9
+ reportSelfClsParameterName = false
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "aws-solutions-constructs.aws-s3-lambda",
8
- "version": "1.109.0",
8
+ "version": "2.92.2",
9
9
  "description": "CDK Constructs for AWS S3 to AWS Lambda integration",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/awslabs/aws-solutions-constructs.git",
@@ -26,34 +26,29 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "aws_solutions_constructs.aws_s3_lambda._jsii": [
29
- "aws-s3-lambda@1.109.0.jsii.tgz"
29
+ "aws-s3-lambda@2.92.2.jsii.tgz"
30
30
  ],
31
31
  "aws_solutions_constructs.aws_s3_lambda": [
32
32
  "py.typed"
33
33
  ]
34
34
  },
35
- "python_requires": ">=3.6",
35
+ "python_requires": "~=3.9",
36
36
  "install_requires": [
37
- "aws-cdk.aws-iam==1.109.0",
38
- "aws-cdk.aws-lambda-event-sources==1.109.0",
39
- "aws-cdk.aws-lambda==1.109.0",
40
- "aws-cdk.aws-s3-notifications==1.109.0",
41
- "aws-cdk.aws-s3==1.109.0",
42
- "aws-cdk.core==1.109.0",
43
- "aws-solutions-constructs.core==1.109.0",
44
- "constructs>=3.2.0, <4.0.0",
45
- "jsii>=1.30.0, <2.0.0",
46
- "publication>=0.0.3"
37
+ "aws-cdk-lib>=2.214.0, <3.0.0",
38
+ "aws-solutions-constructs.core==2.92.2",
39
+ "constructs>=10.0.0, <11.0.0",
40
+ "jsii>=1.111.0, <2.0.0",
41
+ "publication>=0.0.3",
42
+ "typeguard>=2.13.3,<4.3.0"
47
43
  ],
48
44
  "classifiers": [
49
45
  "Intended Audience :: Developers",
50
46
  "Operating System :: OS Independent",
51
47
  "Programming Language :: JavaScript",
52
48
  "Programming Language :: Python :: 3 :: Only",
53
- "Programming Language :: Python :: 3.6",
54
- "Programming Language :: Python :: 3.7",
55
- "Programming Language :: Python :: 3.8",
56
49
  "Programming Language :: Python :: 3.9",
50
+ "Programming Language :: Python :: 3.10",
51
+ "Programming Language :: Python :: 3.11",
57
52
  "Typing :: Typed",
58
53
  "License :: OSI Approved"
59
54
  ],
@@ -0,0 +1,299 @@
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-s3-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_lambda as _aws_cdk_aws_lambda_ceddda9d
37
+ import aws_cdk.aws_lambda_event_sources as _aws_cdk_aws_lambda_event_sources_ceddda9d
38
+ import aws_cdk.aws_s3 as _aws_cdk_aws_s3_ceddda9d
39
+ import constructs as _constructs_77d1e7e8
40
+
41
+
42
+ class S3ToLambda(
43
+ _constructs_77d1e7e8.Construct,
44
+ metaclass=jsii.JSIIMeta,
45
+ jsii_type="@aws-solutions-constructs/aws-s3-lambda.S3ToLambda",
46
+ ):
47
+ def __init__(
48
+ self,
49
+ scope: _constructs_77d1e7e8.Construct,
50
+ id: builtins.str,
51
+ *,
52
+ bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
53
+ existing_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket] = None,
54
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
55
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
56
+ logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
57
+ log_s3_access_logs: typing.Optional[builtins.bool] = None,
58
+ s3_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
59
+ ) -> None:
60
+ '''
61
+ :param scope: - represents the scope for all the resources.
62
+ :param id: - this is a a scope-unique id.
63
+ :param bucket_props: Optional user provided props to override the default props for the S3 Bucket. Default: - Default props are used
64
+ :param existing_bucket_obj: Existing instance of S3 Bucket object, providing both this and ``bucketProps`` will cause an error. Default: - None
65
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
66
+ :param lambda_function_props: Optional user provided props to override the default props for the Lambda function. Default: - Default props are used
67
+ :param logging_bucket_props: Optional user provided props to override the default props for the S3 Logging Bucket. Default: - Default props are used
68
+ :param log_s3_access_logs: Whether to turn on Access Logs for the S3 bucket with the associated storage costs. Enabling Access Logging is a best practice. Default: - true
69
+ :param s3_event_source_props: Optional user provided props to override the default props. Default: - Default props are used
70
+
71
+ :access: public
72
+ :since: 0.8.0
73
+ :summary: Constructs a new instance of the S3ToLambda class.
74
+ '''
75
+ if __debug__:
76
+ type_hints = typing.get_type_hints(_typecheckingstub__f0811c62161a357bb143de47a192dea7bca764ce5568efecd38ce4a912c1e643)
77
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
78
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
79
+ props = S3ToLambdaProps(
80
+ bucket_props=bucket_props,
81
+ existing_bucket_obj=existing_bucket_obj,
82
+ existing_lambda_obj=existing_lambda_obj,
83
+ lambda_function_props=lambda_function_props,
84
+ logging_bucket_props=logging_bucket_props,
85
+ log_s3_access_logs=log_s3_access_logs,
86
+ s3_event_source_props=s3_event_source_props,
87
+ )
88
+
89
+ jsii.create(self.__class__, self, [scope, id, props])
90
+
91
+ @builtins.property
92
+ @jsii.member(jsii_name="lambdaFunction")
93
+ def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
94
+ return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
95
+
96
+ @builtins.property
97
+ @jsii.member(jsii_name="s3BucketInterface")
98
+ def s3_bucket_interface(self) -> _aws_cdk_aws_s3_ceddda9d.IBucket:
99
+ return typing.cast(_aws_cdk_aws_s3_ceddda9d.IBucket, jsii.get(self, "s3BucketInterface"))
100
+
101
+ @builtins.property
102
+ @jsii.member(jsii_name="s3Bucket")
103
+ def s3_bucket(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
104
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], jsii.get(self, "s3Bucket"))
105
+
106
+ @builtins.property
107
+ @jsii.member(jsii_name="s3LoggingBucket")
108
+ def s3_logging_bucket(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
109
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], jsii.get(self, "s3LoggingBucket"))
110
+
111
+
112
+ @jsii.data_type(
113
+ jsii_type="@aws-solutions-constructs/aws-s3-lambda.S3ToLambdaProps",
114
+ jsii_struct_bases=[],
115
+ name_mapping={
116
+ "bucket_props": "bucketProps",
117
+ "existing_bucket_obj": "existingBucketObj",
118
+ "existing_lambda_obj": "existingLambdaObj",
119
+ "lambda_function_props": "lambdaFunctionProps",
120
+ "logging_bucket_props": "loggingBucketProps",
121
+ "log_s3_access_logs": "logS3AccessLogs",
122
+ "s3_event_source_props": "s3EventSourceProps",
123
+ },
124
+ )
125
+ class S3ToLambdaProps:
126
+ def __init__(
127
+ self,
128
+ *,
129
+ bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
130
+ existing_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket] = None,
131
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
132
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
133
+ logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
134
+ log_s3_access_logs: typing.Optional[builtins.bool] = None,
135
+ s3_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
136
+ ) -> None:
137
+ '''
138
+ :param bucket_props: Optional user provided props to override the default props for the S3 Bucket. Default: - Default props are used
139
+ :param existing_bucket_obj: Existing instance of S3 Bucket object, providing both this and ``bucketProps`` will cause an error. Default: - None
140
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
141
+ :param lambda_function_props: Optional user provided props to override the default props for the Lambda function. Default: - Default props are used
142
+ :param logging_bucket_props: Optional user provided props to override the default props for the S3 Logging Bucket. Default: - Default props are used
143
+ :param log_s3_access_logs: Whether to turn on Access Logs for the S3 bucket with the associated storage costs. Enabling Access Logging is a best practice. Default: - true
144
+ :param s3_event_source_props: Optional user provided props to override the default props. Default: - Default props are used
145
+
146
+ :summary: The properties for the S3ToLambda class.
147
+ '''
148
+ if isinstance(bucket_props, dict):
149
+ bucket_props = _aws_cdk_aws_s3_ceddda9d.BucketProps(**bucket_props)
150
+ if isinstance(lambda_function_props, dict):
151
+ lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
152
+ if isinstance(logging_bucket_props, dict):
153
+ logging_bucket_props = _aws_cdk_aws_s3_ceddda9d.BucketProps(**logging_bucket_props)
154
+ if isinstance(s3_event_source_props, dict):
155
+ s3_event_source_props = _aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps(**s3_event_source_props)
156
+ if __debug__:
157
+ type_hints = typing.get_type_hints(_typecheckingstub__05960546136526c4230988e49552d9aaca803e226891f3dbd12ba8071a5a14e3)
158
+ check_type(argname="argument bucket_props", value=bucket_props, expected_type=type_hints["bucket_props"])
159
+ check_type(argname="argument existing_bucket_obj", value=existing_bucket_obj, expected_type=type_hints["existing_bucket_obj"])
160
+ check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
161
+ check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
162
+ check_type(argname="argument logging_bucket_props", value=logging_bucket_props, expected_type=type_hints["logging_bucket_props"])
163
+ check_type(argname="argument log_s3_access_logs", value=log_s3_access_logs, expected_type=type_hints["log_s3_access_logs"])
164
+ check_type(argname="argument s3_event_source_props", value=s3_event_source_props, expected_type=type_hints["s3_event_source_props"])
165
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
166
+ if bucket_props is not None:
167
+ self._values["bucket_props"] = bucket_props
168
+ if existing_bucket_obj is not None:
169
+ self._values["existing_bucket_obj"] = existing_bucket_obj
170
+ if existing_lambda_obj is not None:
171
+ self._values["existing_lambda_obj"] = existing_lambda_obj
172
+ if lambda_function_props is not None:
173
+ self._values["lambda_function_props"] = lambda_function_props
174
+ if logging_bucket_props is not None:
175
+ self._values["logging_bucket_props"] = logging_bucket_props
176
+ if log_s3_access_logs is not None:
177
+ self._values["log_s3_access_logs"] = log_s3_access_logs
178
+ if s3_event_source_props is not None:
179
+ self._values["s3_event_source_props"] = s3_event_source_props
180
+
181
+ @builtins.property
182
+ def bucket_props(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps]:
183
+ '''Optional user provided props to override the default props for the S3 Bucket.
184
+
185
+ :default: - Default props are used
186
+ '''
187
+ result = self._values.get("bucket_props")
188
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps], result)
189
+
190
+ @builtins.property
191
+ def existing_bucket_obj(self) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket]:
192
+ '''Existing instance of S3 Bucket object, providing both this and ``bucketProps`` will cause an error.
193
+
194
+ :default: - None
195
+ '''
196
+ result = self._values.get("existing_bucket_obj")
197
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket], result)
198
+
199
+ @builtins.property
200
+ def existing_lambda_obj(
201
+ self,
202
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
203
+ '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
204
+
205
+ :default: - None
206
+ '''
207
+ result = self._values.get("existing_lambda_obj")
208
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
209
+
210
+ @builtins.property
211
+ def lambda_function_props(
212
+ self,
213
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
214
+ '''Optional user provided props to override the default props for the Lambda function.
215
+
216
+ :default: - Default props are used
217
+ '''
218
+ result = self._values.get("lambda_function_props")
219
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
220
+
221
+ @builtins.property
222
+ def logging_bucket_props(
223
+ self,
224
+ ) -> typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps]:
225
+ '''Optional user provided props to override the default props for the S3 Logging Bucket.
226
+
227
+ :default: - Default props are used
228
+ '''
229
+ result = self._values.get("logging_bucket_props")
230
+ return typing.cast(typing.Optional[_aws_cdk_aws_s3_ceddda9d.BucketProps], result)
231
+
232
+ @builtins.property
233
+ def log_s3_access_logs(self) -> typing.Optional[builtins.bool]:
234
+ '''Whether to turn on Access Logs for the S3 bucket with the associated storage costs.
235
+
236
+ Enabling Access Logging is a best practice.
237
+
238
+ :default: - true
239
+ '''
240
+ result = self._values.get("log_s3_access_logs")
241
+ return typing.cast(typing.Optional[builtins.bool], result)
242
+
243
+ @builtins.property
244
+ def s3_event_source_props(
245
+ self,
246
+ ) -> typing.Optional[_aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps]:
247
+ '''Optional user provided props to override the default props.
248
+
249
+ :default: - Default props are used
250
+ '''
251
+ result = self._values.get("s3_event_source_props")
252
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps], result)
253
+
254
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
255
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
256
+
257
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
258
+ return not (rhs == self)
259
+
260
+ def __repr__(self) -> str:
261
+ return "S3ToLambdaProps(%s)" % ", ".join(
262
+ k + "=" + repr(v) for k, v in self._values.items()
263
+ )
264
+
265
+
266
+ __all__ = [
267
+ "S3ToLambda",
268
+ "S3ToLambdaProps",
269
+ ]
270
+
271
+ publication.publish()
272
+
273
+ def _typecheckingstub__f0811c62161a357bb143de47a192dea7bca764ce5568efecd38ce4a912c1e643(
274
+ scope: _constructs_77d1e7e8.Construct,
275
+ id: builtins.str,
276
+ *,
277
+ bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
278
+ existing_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket] = None,
279
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
280
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
281
+ logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
282
+ log_s3_access_logs: typing.Optional[builtins.bool] = None,
283
+ s3_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
284
+ ) -> None:
285
+ """Type checking stubs"""
286
+ pass
287
+
288
+ def _typecheckingstub__05960546136526c4230988e49552d9aaca803e226891f3dbd12ba8071a5a14e3(
289
+ *,
290
+ bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
291
+ existing_bucket_obj: typing.Optional[_aws_cdk_aws_s3_ceddda9d.Bucket] = None,
292
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
293
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
294
+ logging_bucket_props: typing.Optional[typing.Union[_aws_cdk_aws_s3_ceddda9d.BucketProps, typing.Dict[builtins.str, typing.Any]]] = None,
295
+ log_s3_access_logs: typing.Optional[builtins.bool] = None,
296
+ s3_event_source_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_event_sources_ceddda9d.S3EventSourceProps, typing.Dict[builtins.str, typing.Any]]] = None,
297
+ ) -> None:
298
+ """Type checking stubs"""
299
+ 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-s3-lambda",
37
+ "2.92.2",
38
+ __name__[0:-6],
39
+ "aws-s3-lambda@2.92.2.jsii.tgz",
40
+ )
41
+
42
+ __all__ = [
43
+ "__jsii_assembly__",
44
+ ]
45
+
46
+ publication.publish()
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-s3-lambda
3
+ Version: 2.92.2
4
+ Summary: CDK Constructs for AWS S3 to AWS Lambda integration
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.214.0
22
+ Requires-Dist: aws-solutions-constructs.core==2.92.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
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-s3-lambda/README.adoc)
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_s3_lambda.egg-info/top_level.txt
11
11
  src/aws_solutions_constructs/aws_s3_lambda/__init__.py
12
12
  src/aws_solutions_constructs/aws_s3_lambda/py.typed
13
13
  src/aws_solutions_constructs/aws_s3_lambda/_jsii/__init__.py
14
- src/aws_solutions_constructs/aws_s3_lambda/_jsii/aws-s3-lambda@1.109.0.jsii.tgz
14
+ src/aws_solutions_constructs/aws_s3_lambda/_jsii/aws-s3-lambda@2.92.2.jsii.tgz
@@ -0,0 +1,6 @@
1
+ aws-cdk-lib<3.0.0,>=2.214.0
2
+ aws-solutions-constructs.core==2.92.2
3
+ constructs<11.0.0,>=10.0.0
4
+ jsii<2.0.0,>=1.111.0
5
+ publication>=0.0.3
6
+ typeguard<4.3.0,>=2.13.3
@@ -1,125 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-s3-lambda
3
- Version: 1.109.0
4
- Summary: CDK Constructs for AWS S3 to AWS Lambda integration
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
- Description: # aws-s3-lambda module
10
-
11
- <!--BEGIN STABILITY BANNER-->---
12
-
13
-
14
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
15
-
16
- > All classes are under active development and subject to non-backward compatible changes or removal in any
17
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
18
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
19
-
20
- ---
21
- <!--END STABILITY BANNER-->
22
-
23
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
24
- |:-------------|:-------------|
25
-
26
- <div style="height:8px"></div>
27
-
28
- | **Language** | **Package** |
29
- |:-------------|-----------------|
30
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_s3_lambda`|
31
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-s3-lambda`|
32
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.s3lambda`|
33
-
34
- This AWS Solutions Construct implements an Amazon S3 bucket connected to an AWS Lambda function.
35
-
36
- Here is a minimal deployable pattern definition in Typescript:
37
-
38
- ```python
39
- # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
40
- from aws_solutions_constructs.aws_s3_lambda import S3ToLambdaProps, S3ToLambda
41
-
42
- S3ToLambda(self, "test-s3-lambda",
43
- lambda_function_props=FunctionProps(
44
- code=lambda_.Code.from_asset(f"{__dirname}/lambda"),
45
- runtime=lambda_.Runtime.NODEJS_12_X,
46
- handler="index.handler"
47
- )
48
- )
49
- ```
50
-
51
- ## Initializer
52
-
53
- ```text
54
- new S3ToLambda(scope: Construct, id: string, props: S3ToLambdaProps);
55
- ```
56
-
57
- *Parameters*
58
-
59
- * scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
60
- * id `string`
61
- * props [`S3ToLambdaProps`](#pattern-construct-props)
62
-
63
- ## Pattern Construct Props
64
-
65
- | **Name** | **Type** | **Description** |
66
- |:-------------|:----------------|-----------------|
67
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
68
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
69
- |existingBucketObj?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Existing instance of S3 Bucket object. If this is provided, then also providing bucketProps is an error. |
70
- |bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|User provided props to override the default props for the S3 Bucket.|
71
- |s3EventSourceProps?|[`S3EventSourceProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda-event-sources.S3EventSourceProps.html)|Optional user provided props to override the default props for S3EventSourceProps|
72
-
73
- ## Pattern Properties
74
-
75
- | **Name** | **Type** | **Description** |
76
- |:-------------|:----------------|-----------------|
77
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of the lambda.Function created by the construct|
78
- |s3Bucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of the s3.Bucket created by the construct|
79
- |s3LoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.|
80
-
81
- ## Default settings
82
-
83
- Out of the box implementation of the Construct without any override will set the following defaults:
84
-
85
- ### Amazon S3 Bucket
86
-
87
- * Configure Access logging for S3 Bucket
88
- * Enable server-side encryption for S3 Bucket using AWS managed KMS Key
89
- * Enforce encryption of data in transit
90
- * Turn on the versioning for S3 Bucket
91
- * Don't allow public access for S3 Bucket
92
- * Retain the S3 Bucket when deleting the CloudFormation stack
93
- * Applies Lifecycle rule to move noncurrent object versions to Glacier storage after 90 days
94
-
95
- ### AWS Lambda Function
96
-
97
- * Configure limited privilege access IAM role for Lambda function
98
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
99
- * Enable X-Ray Tracing
100
- * Set Environment Variables
101
-
102
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
103
-
104
- ## Architecture
105
-
106
- ![Architecture Diagram](architecture.png)
107
-
108
- ---
109
-
110
-
111
- © Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
112
-
113
- Platform: UNKNOWN
114
- Classifier: Intended Audience :: Developers
115
- Classifier: Operating System :: OS Independent
116
- Classifier: Programming Language :: JavaScript
117
- Classifier: Programming Language :: Python :: 3 :: Only
118
- Classifier: Programming Language :: Python :: 3.6
119
- Classifier: Programming Language :: Python :: 3.7
120
- Classifier: Programming Language :: Python :: 3.8
121
- Classifier: Programming Language :: Python :: 3.9
122
- Classifier: Typing :: Typed
123
- Classifier: License :: OSI Approved
124
- Requires-Python: >=3.6
125
- Description-Content-Type: text/markdown
@@ -1,103 +0,0 @@
1
- # aws-s3-lambda module
2
-
3
- <!--BEGIN STABILITY BANNER-->---
4
-
5
-
6
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
7
-
8
- > All classes are under active development and subject to non-backward compatible changes or removal in any
9
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
10
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
11
-
12
- ---
13
- <!--END STABILITY BANNER-->
14
-
15
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
16
- |:-------------|:-------------|
17
-
18
- <div style="height:8px"></div>
19
-
20
- | **Language** | **Package** |
21
- |:-------------|-----------------|
22
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_s3_lambda`|
23
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-s3-lambda`|
24
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.s3lambda`|
25
-
26
- This AWS Solutions Construct implements an Amazon S3 bucket connected to an AWS Lambda function.
27
-
28
- Here is a minimal deployable pattern definition in Typescript:
29
-
30
- ```python
31
- # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
32
- from aws_solutions_constructs.aws_s3_lambda import S3ToLambdaProps, S3ToLambda
33
-
34
- S3ToLambda(self, "test-s3-lambda",
35
- lambda_function_props=FunctionProps(
36
- code=lambda_.Code.from_asset(f"{__dirname}/lambda"),
37
- runtime=lambda_.Runtime.NODEJS_12_X,
38
- handler="index.handler"
39
- )
40
- )
41
- ```
42
-
43
- ## Initializer
44
-
45
- ```text
46
- new S3ToLambda(scope: Construct, id: string, props: S3ToLambdaProps);
47
- ```
48
-
49
- *Parameters*
50
-
51
- * scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
52
- * id `string`
53
- * props [`S3ToLambdaProps`](#pattern-construct-props)
54
-
55
- ## Pattern Construct Props
56
-
57
- | **Name** | **Type** | **Description** |
58
- |:-------------|:----------------|-----------------|
59
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
60
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
61
- |existingBucketObj?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Existing instance of S3 Bucket object. If this is provided, then also providing bucketProps is an error. |
62
- |bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|User provided props to override the default props for the S3 Bucket.|
63
- |s3EventSourceProps?|[`S3EventSourceProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda-event-sources.S3EventSourceProps.html)|Optional user provided props to override the default props for S3EventSourceProps|
64
-
65
- ## Pattern Properties
66
-
67
- | **Name** | **Type** | **Description** |
68
- |:-------------|:----------------|-----------------|
69
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of the lambda.Function created by the construct|
70
- |s3Bucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of the s3.Bucket created by the construct|
71
- |s3LoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.|
72
-
73
- ## Default settings
74
-
75
- Out of the box implementation of the Construct without any override will set the following defaults:
76
-
77
- ### Amazon S3 Bucket
78
-
79
- * Configure Access logging for S3 Bucket
80
- * Enable server-side encryption for S3 Bucket using AWS managed KMS Key
81
- * Enforce encryption of data in transit
82
- * Turn on the versioning for S3 Bucket
83
- * Don't allow public access for S3 Bucket
84
- * Retain the S3 Bucket when deleting the CloudFormation stack
85
- * Applies Lifecycle rule to move noncurrent object versions to Glacier storage after 90 days
86
-
87
- ### AWS Lambda Function
88
-
89
- * Configure limited privilege access IAM role for Lambda function
90
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
91
- * Enable X-Ray Tracing
92
- * Set Environment Variables
93
-
94
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
95
-
96
- ## Architecture
97
-
98
- ![Architecture Diagram](architecture.png)
99
-
100
- ---
101
-
102
-
103
- © Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -1,3 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools~=56.0.0", "wheel~=0.36.2"]
3
- build-backend = "setuptools.build_meta"
@@ -1,293 +0,0 @@
1
- '''
2
- # aws-s3-lambda module
3
-
4
- <!--BEGIN STABILITY BANNER-->---
5
-
6
-
7
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
8
-
9
- > All classes are under active development and subject to non-backward compatible changes or removal in any
10
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
11
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
12
-
13
- ---
14
- <!--END STABILITY BANNER-->
15
-
16
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
17
- |:-------------|:-------------|
18
-
19
- <div style="height:8px"></div>
20
-
21
- | **Language** | **Package** |
22
- |:-------------|-----------------|
23
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_s3_lambda`|
24
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-s3-lambda`|
25
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.s3lambda`|
26
-
27
- This AWS Solutions Construct implements an Amazon S3 bucket connected to an AWS Lambda function.
28
-
29
- Here is a minimal deployable pattern definition in Typescript:
30
-
31
- ```python
32
- # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
33
- from aws_solutions_constructs.aws_s3_lambda import S3ToLambdaProps, S3ToLambda
34
-
35
- S3ToLambda(self, "test-s3-lambda",
36
- lambda_function_props=FunctionProps(
37
- code=lambda_.Code.from_asset(f"{__dirname}/lambda"),
38
- runtime=lambda_.Runtime.NODEJS_12_X,
39
- handler="index.handler"
40
- )
41
- )
42
- ```
43
-
44
- ## Initializer
45
-
46
- ```text
47
- new S3ToLambda(scope: Construct, id: string, props: S3ToLambdaProps);
48
- ```
49
-
50
- *Parameters*
51
-
52
- * scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
53
- * id `string`
54
- * props [`S3ToLambdaProps`](#pattern-construct-props)
55
-
56
- ## Pattern Construct Props
57
-
58
- | **Name** | **Type** | **Description** |
59
- |:-------------|:----------------|-----------------|
60
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
61
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
62
- |existingBucketObj?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Existing instance of S3 Bucket object. If this is provided, then also providing bucketProps is an error. |
63
- |bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|User provided props to override the default props for the S3 Bucket.|
64
- |s3EventSourceProps?|[`S3EventSourceProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda-event-sources.S3EventSourceProps.html)|Optional user provided props to override the default props for S3EventSourceProps|
65
-
66
- ## Pattern Properties
67
-
68
- | **Name** | **Type** | **Description** |
69
- |:-------------|:----------------|-----------------|
70
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of the lambda.Function created by the construct|
71
- |s3Bucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of the s3.Bucket created by the construct|
72
- |s3LoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.|
73
-
74
- ## Default settings
75
-
76
- Out of the box implementation of the Construct without any override will set the following defaults:
77
-
78
- ### Amazon S3 Bucket
79
-
80
- * Configure Access logging for S3 Bucket
81
- * Enable server-side encryption for S3 Bucket using AWS managed KMS Key
82
- * Enforce encryption of data in transit
83
- * Turn on the versioning for S3 Bucket
84
- * Don't allow public access for S3 Bucket
85
- * Retain the S3 Bucket when deleting the CloudFormation stack
86
- * Applies Lifecycle rule to move noncurrent object versions to Glacier storage after 90 days
87
-
88
- ### AWS Lambda Function
89
-
90
- * Configure limited privilege access IAM role for Lambda function
91
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
92
- * Enable X-Ray Tracing
93
- * Set Environment Variables
94
-
95
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
96
-
97
- ## Architecture
98
-
99
- ![Architecture Diagram](architecture.png)
100
-
101
- ---
102
-
103
-
104
- © Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
105
- '''
106
- import abc
107
- import builtins
108
- import datetime
109
- import enum
110
- import typing
111
-
112
- import jsii
113
- import publication
114
- import typing_extensions
115
-
116
- from ._jsii import *
117
-
118
- import aws_cdk.aws_lambda
119
- import aws_cdk.aws_lambda_event_sources
120
- import aws_cdk.aws_s3
121
- import aws_cdk.core
122
-
123
-
124
- class S3ToLambda(
125
- aws_cdk.core.Construct,
126
- metaclass=jsii.JSIIMeta,
127
- jsii_type="@aws-solutions-constructs/aws-s3-lambda.S3ToLambda",
128
- ):
129
- def __init__(
130
- self,
131
- scope: aws_cdk.core.Construct,
132
- id: builtins.str,
133
- *,
134
- bucket_props: typing.Optional[aws_cdk.aws_s3.BucketProps] = None,
135
- existing_bucket_obj: typing.Optional[aws_cdk.aws_s3.Bucket] = None,
136
- existing_lambda_obj: typing.Optional[aws_cdk.aws_lambda.Function] = None,
137
- lambda_function_props: typing.Optional[aws_cdk.aws_lambda.FunctionProps] = None,
138
- s3_event_source_props: typing.Optional[aws_cdk.aws_lambda_event_sources.S3EventSourceProps] = None,
139
- ) -> None:
140
- '''
141
- :param scope: - represents the scope for all the resources.
142
- :param id: - this is a a scope-unique id.
143
- :param bucket_props: User provided props to override the default props for the S3 Bucket. Default: - Default props are used
144
- :param existing_bucket_obj: Existing instance of S3 Bucket object, providing both this and ``bucketProps`` will cause an error. Default: - None
145
- :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
146
- :param lambda_function_props: User provided props to override the default props for the Lambda function. Default: - Default props are used
147
- :param s3_event_source_props: Optional user provided props to override the default props. Default: - Default props are used
148
-
149
- :access: public
150
- :since: 0.8.0
151
- :summary: Constructs a new instance of the S3ToLambda class.
152
- '''
153
- props = S3ToLambdaProps(
154
- bucket_props=bucket_props,
155
- existing_bucket_obj=existing_bucket_obj,
156
- existing_lambda_obj=existing_lambda_obj,
157
- lambda_function_props=lambda_function_props,
158
- s3_event_source_props=s3_event_source_props,
159
- )
160
-
161
- jsii.create(S3ToLambda, self, [scope, id, props])
162
-
163
- @builtins.property # type: ignore[misc]
164
- @jsii.member(jsii_name="lambdaFunction")
165
- def lambda_function(self) -> aws_cdk.aws_lambda.Function:
166
- return typing.cast(aws_cdk.aws_lambda.Function, jsii.get(self, "lambdaFunction"))
167
-
168
- @builtins.property # type: ignore[misc]
169
- @jsii.member(jsii_name="s3Bucket")
170
- def s3_bucket(self) -> typing.Optional[aws_cdk.aws_s3.Bucket]:
171
- return typing.cast(typing.Optional[aws_cdk.aws_s3.Bucket], jsii.get(self, "s3Bucket"))
172
-
173
- @builtins.property # type: ignore[misc]
174
- @jsii.member(jsii_name="s3LoggingBucket")
175
- def s3_logging_bucket(self) -> typing.Optional[aws_cdk.aws_s3.Bucket]:
176
- return typing.cast(typing.Optional[aws_cdk.aws_s3.Bucket], jsii.get(self, "s3LoggingBucket"))
177
-
178
-
179
- @jsii.data_type(
180
- jsii_type="@aws-solutions-constructs/aws-s3-lambda.S3ToLambdaProps",
181
- jsii_struct_bases=[],
182
- name_mapping={
183
- "bucket_props": "bucketProps",
184
- "existing_bucket_obj": "existingBucketObj",
185
- "existing_lambda_obj": "existingLambdaObj",
186
- "lambda_function_props": "lambdaFunctionProps",
187
- "s3_event_source_props": "s3EventSourceProps",
188
- },
189
- )
190
- class S3ToLambdaProps:
191
- def __init__(
192
- self,
193
- *,
194
- bucket_props: typing.Optional[aws_cdk.aws_s3.BucketProps] = None,
195
- existing_bucket_obj: typing.Optional[aws_cdk.aws_s3.Bucket] = None,
196
- existing_lambda_obj: typing.Optional[aws_cdk.aws_lambda.Function] = None,
197
- lambda_function_props: typing.Optional[aws_cdk.aws_lambda.FunctionProps] = None,
198
- s3_event_source_props: typing.Optional[aws_cdk.aws_lambda_event_sources.S3EventSourceProps] = None,
199
- ) -> None:
200
- '''
201
- :param bucket_props: User provided props to override the default props for the S3 Bucket. Default: - Default props are used
202
- :param existing_bucket_obj: Existing instance of S3 Bucket object, providing both this and ``bucketProps`` will cause an error. Default: - None
203
- :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
204
- :param lambda_function_props: User provided props to override the default props for the Lambda function. Default: - Default props are used
205
- :param s3_event_source_props: Optional user provided props to override the default props. Default: - Default props are used
206
-
207
- :summary: The properties for the S3ToLambda class.
208
- '''
209
- if isinstance(bucket_props, dict):
210
- bucket_props = aws_cdk.aws_s3.BucketProps(**bucket_props)
211
- if isinstance(lambda_function_props, dict):
212
- lambda_function_props = aws_cdk.aws_lambda.FunctionProps(**lambda_function_props)
213
- if isinstance(s3_event_source_props, dict):
214
- s3_event_source_props = aws_cdk.aws_lambda_event_sources.S3EventSourceProps(**s3_event_source_props)
215
- self._values: typing.Dict[str, typing.Any] = {}
216
- if bucket_props is not None:
217
- self._values["bucket_props"] = bucket_props
218
- if existing_bucket_obj is not None:
219
- self._values["existing_bucket_obj"] = existing_bucket_obj
220
- if existing_lambda_obj is not None:
221
- self._values["existing_lambda_obj"] = existing_lambda_obj
222
- if lambda_function_props is not None:
223
- self._values["lambda_function_props"] = lambda_function_props
224
- if s3_event_source_props is not None:
225
- self._values["s3_event_source_props"] = s3_event_source_props
226
-
227
- @builtins.property
228
- def bucket_props(self) -> typing.Optional[aws_cdk.aws_s3.BucketProps]:
229
- '''User provided props to override the default props for the S3 Bucket.
230
-
231
- :default: - Default props are used
232
- '''
233
- result = self._values.get("bucket_props")
234
- return typing.cast(typing.Optional[aws_cdk.aws_s3.BucketProps], result)
235
-
236
- @builtins.property
237
- def existing_bucket_obj(self) -> typing.Optional[aws_cdk.aws_s3.Bucket]:
238
- '''Existing instance of S3 Bucket object, providing both this and ``bucketProps`` will cause an error.
239
-
240
- :default: - None
241
- '''
242
- result = self._values.get("existing_bucket_obj")
243
- return typing.cast(typing.Optional[aws_cdk.aws_s3.Bucket], result)
244
-
245
- @builtins.property
246
- def existing_lambda_obj(self) -> typing.Optional[aws_cdk.aws_lambda.Function]:
247
- '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
248
-
249
- :default: - None
250
- '''
251
- result = self._values.get("existing_lambda_obj")
252
- return typing.cast(typing.Optional[aws_cdk.aws_lambda.Function], result)
253
-
254
- @builtins.property
255
- def lambda_function_props(
256
- self,
257
- ) -> typing.Optional[aws_cdk.aws_lambda.FunctionProps]:
258
- '''User provided props to override the default props for the Lambda function.
259
-
260
- :default: - Default props are used
261
- '''
262
- result = self._values.get("lambda_function_props")
263
- return typing.cast(typing.Optional[aws_cdk.aws_lambda.FunctionProps], result)
264
-
265
- @builtins.property
266
- def s3_event_source_props(
267
- self,
268
- ) -> typing.Optional[aws_cdk.aws_lambda_event_sources.S3EventSourceProps]:
269
- '''Optional user provided props to override the default props.
270
-
271
- :default: - Default props are used
272
- '''
273
- result = self._values.get("s3_event_source_props")
274
- return typing.cast(typing.Optional[aws_cdk.aws_lambda_event_sources.S3EventSourceProps], result)
275
-
276
- def __eq__(self, rhs: typing.Any) -> builtins.bool:
277
- return isinstance(rhs, self.__class__) and rhs._values == self._values
278
-
279
- def __ne__(self, rhs: typing.Any) -> builtins.bool:
280
- return not (rhs == self)
281
-
282
- def __repr__(self) -> str:
283
- return "S3ToLambdaProps(%s)" % ", ".join(
284
- k + "=" + repr(v) for k, v in self._values.items()
285
- )
286
-
287
-
288
- __all__ = [
289
- "S3ToLambda",
290
- "S3ToLambdaProps",
291
- ]
292
-
293
- publication.publish()
@@ -1,31 +0,0 @@
1
- import abc
2
- import builtins
3
- import datetime
4
- import enum
5
- import typing
6
-
7
- import jsii
8
- import publication
9
- import typing_extensions
10
-
11
- import aws_cdk.aws_iam._jsii
12
- import aws_cdk.aws_lambda._jsii
13
- import aws_cdk.aws_lambda_event_sources._jsii
14
- import aws_cdk.aws_s3._jsii
15
- import aws_cdk.aws_s3_notifications._jsii
16
- import aws_cdk.core._jsii
17
- import aws_solutions_constructs.core._jsii
18
- import constructs._jsii
19
-
20
- __jsii_assembly__ = jsii.JSIIAssembly.load(
21
- "@aws-solutions-constructs/aws-s3-lambda",
22
- "1.109.0",
23
- __name__[0:-6],
24
- "aws-s3-lambda@1.109.0.jsii.tgz",
25
- )
26
-
27
- __all__ = [
28
- "__jsii_assembly__",
29
- ]
30
-
31
- publication.publish()
@@ -1,125 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-s3-lambda
3
- Version: 1.109.0
4
- Summary: CDK Constructs for AWS S3 to AWS Lambda integration
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
- Description: # aws-s3-lambda module
10
-
11
- <!--BEGIN STABILITY BANNER-->---
12
-
13
-
14
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
15
-
16
- > All classes are under active development and subject to non-backward compatible changes or removal in any
17
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
18
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
19
-
20
- ---
21
- <!--END STABILITY BANNER-->
22
-
23
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
24
- |:-------------|:-------------|
25
-
26
- <div style="height:8px"></div>
27
-
28
- | **Language** | **Package** |
29
- |:-------------|-----------------|
30
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_s3_lambda`|
31
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-s3-lambda`|
32
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.s3lambda`|
33
-
34
- This AWS Solutions Construct implements an Amazon S3 bucket connected to an AWS Lambda function.
35
-
36
- Here is a minimal deployable pattern definition in Typescript:
37
-
38
- ```python
39
- # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
40
- from aws_solutions_constructs.aws_s3_lambda import S3ToLambdaProps, S3ToLambda
41
-
42
- S3ToLambda(self, "test-s3-lambda",
43
- lambda_function_props=FunctionProps(
44
- code=lambda_.Code.from_asset(f"{__dirname}/lambda"),
45
- runtime=lambda_.Runtime.NODEJS_12_X,
46
- handler="index.handler"
47
- )
48
- )
49
- ```
50
-
51
- ## Initializer
52
-
53
- ```text
54
- new S3ToLambda(scope: Construct, id: string, props: S3ToLambdaProps);
55
- ```
56
-
57
- *Parameters*
58
-
59
- * scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
60
- * id `string`
61
- * props [`S3ToLambdaProps`](#pattern-construct-props)
62
-
63
- ## Pattern Construct Props
64
-
65
- | **Name** | **Type** | **Description** |
66
- |:-------------|:----------------|-----------------|
67
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
68
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
69
- |existingBucketObj?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Existing instance of S3 Bucket object. If this is provided, then also providing bucketProps is an error. |
70
- |bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|User provided props to override the default props for the S3 Bucket.|
71
- |s3EventSourceProps?|[`S3EventSourceProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda-event-sources.S3EventSourceProps.html)|Optional user provided props to override the default props for S3EventSourceProps|
72
-
73
- ## Pattern Properties
74
-
75
- | **Name** | **Type** | **Description** |
76
- |:-------------|:----------------|-----------------|
77
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of the lambda.Function created by the construct|
78
- |s3Bucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of the s3.Bucket created by the construct|
79
- |s3LoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.|
80
-
81
- ## Default settings
82
-
83
- Out of the box implementation of the Construct without any override will set the following defaults:
84
-
85
- ### Amazon S3 Bucket
86
-
87
- * Configure Access logging for S3 Bucket
88
- * Enable server-side encryption for S3 Bucket using AWS managed KMS Key
89
- * Enforce encryption of data in transit
90
- * Turn on the versioning for S3 Bucket
91
- * Don't allow public access for S3 Bucket
92
- * Retain the S3 Bucket when deleting the CloudFormation stack
93
- * Applies Lifecycle rule to move noncurrent object versions to Glacier storage after 90 days
94
-
95
- ### AWS Lambda Function
96
-
97
- * Configure limited privilege access IAM role for Lambda function
98
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
99
- * Enable X-Ray Tracing
100
- * Set Environment Variables
101
-
102
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
103
-
104
- ## Architecture
105
-
106
- ![Architecture Diagram](architecture.png)
107
-
108
- ---
109
-
110
-
111
- © Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
112
-
113
- Platform: UNKNOWN
114
- Classifier: Intended Audience :: Developers
115
- Classifier: Operating System :: OS Independent
116
- Classifier: Programming Language :: JavaScript
117
- Classifier: Programming Language :: Python :: 3 :: Only
118
- Classifier: Programming Language :: Python :: 3.6
119
- Classifier: Programming Language :: Python :: 3.7
120
- Classifier: Programming Language :: Python :: 3.8
121
- Classifier: Programming Language :: Python :: 3.9
122
- Classifier: Typing :: Typed
123
- Classifier: License :: OSI Approved
124
- Requires-Python: >=3.6
125
- Description-Content-Type: text/markdown
@@ -1,10 +0,0 @@
1
- aws-cdk.aws-iam==1.109.0
2
- aws-cdk.aws-lambda-event-sources==1.109.0
3
- aws-cdk.aws-lambda==1.109.0
4
- aws-cdk.aws-s3-notifications==1.109.0
5
- aws-cdk.aws-s3==1.109.0
6
- aws-cdk.core==1.109.0
7
- aws-solutions-constructs.core==1.109.0
8
- constructs<4.0.0,>=3.2.0
9
- jsii<2.0.0,>=1.30.0
10
- publication>=0.0.3