aws-solutions-constructs.aws-lambda-secretsmanager 1.128.0__tar.gz → 2.95.0__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_lambda_secretsmanager-2.95.0/PKG-INFO +28 -0
  2. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/README.md +1 -0
  3. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/pyproject.toml +9 -0
  4. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/setup.py +11 -14
  5. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/src/aws_solutions_constructs/aws_lambda_secretsmanager/__init__.py +329 -0
  6. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/__init__.py +46 -0
  7. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/aws-lambda-secretsmanager@2.95.0.jsii.tgz +0 -0
  8. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/PKG-INFO +28 -0
  9. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/SOURCES.txt +1 -1
  10. aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/requires.txt +6 -0
  11. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/PKG-INFO +0 -136
  12. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/README.md +0 -111
  13. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/pyproject.toml +0 -3
  14. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/src/aws_solutions_constructs/aws_lambda_secretsmanager/__init__.py +0 -366
  15. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/__init__.py +0 -29
  16. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/aws-lambda-secretsmanager@1.128.0.jsii.tgz +0 -0
  17. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/PKG-INFO +0 -136
  18. aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/requires.txt +0 -8
  19. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/LICENSE +0 -0
  20. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/MANIFEST.in +0 -0
  21. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/setup.cfg +0 -0
  22. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/src/aws_solutions_constructs/aws_lambda_secretsmanager/py.typed +0 -0
  23. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/dependency_links.txt +0 -0
  24. {aws-solutions-constructs.aws-lambda-secretsmanager-1.128.0 → aws_solutions_constructs_aws_lambda_secretsmanager-2.95.0}/src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/top_level.txt +0 -0
@@ -0,0 +1,28 @@
1
+ Metadata-Version: 2.1
2
+ Name: aws-solutions-constructs.aws-lambda-secretsmanager
3
+ Version: 2.95.0
4
+ Summary: CDK constructs for defining an interaction between an AWS Lambda function and AWS Secrets Manager.
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.0
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-lambda-secretsmanager/README.adoc)
@@ -0,0 +1 @@
1
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-secretsmanager/README.adoc)
@@ -0,0 +1,9 @@
1
+ [build-system]
2
+ requires = ["setuptools~=75.3.2", "build~=1.3.0"]
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-lambda-secretsmanager",
8
- "version": "1.128.0",
8
+ "version": "2.95.0",
9
9
  "description": "CDK constructs for defining an interaction between an AWS Lambda function and AWS Secrets Manager.",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/awslabs/aws-solutions-constructs.git",
@@ -26,32 +26,29 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "aws_solutions_constructs.aws_lambda_secretsmanager._jsii": [
29
- "aws-lambda-secretsmanager@1.128.0.jsii.tgz"
29
+ "aws-lambda-secretsmanager@2.95.0.jsii.tgz"
30
30
  ],
31
31
  "aws_solutions_constructs.aws_lambda_secretsmanager": [
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-ec2==1.128.0",
38
- "aws-cdk.aws-lambda==1.128.0",
39
- "aws-cdk.aws-secretsmanager==1.128.0",
40
- "aws-cdk.core==1.128.0",
41
- "aws-solutions-constructs.core==1.128.0",
42
- "constructs>=3.2.0, <4.0.0",
43
- "jsii>=1.46.0, <2.0.0",
44
- "publication>=0.0.3"
37
+ "aws-cdk-lib>=2.223.0, <3.0.0",
38
+ "aws-solutions-constructs.core==2.95.0",
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"
45
43
  ],
46
44
  "classifiers": [
47
45
  "Intended Audience :: Developers",
48
46
  "Operating System :: OS Independent",
49
47
  "Programming Language :: JavaScript",
50
48
  "Programming Language :: Python :: 3 :: Only",
51
- "Programming Language :: Python :: 3.6",
52
- "Programming Language :: Python :: 3.7",
53
- "Programming Language :: Python :: 3.8",
54
49
  "Programming Language :: Python :: 3.9",
50
+ "Programming Language :: Python :: 3.10",
51
+ "Programming Language :: Python :: 3.11",
55
52
  "Typing :: Typed",
56
53
  "License :: OSI Approved"
57
54
  ],
@@ -0,0 +1,329 @@
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-lambda-secretsmanager/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_ec2 as _aws_cdk_aws_ec2_ceddda9d
37
+ import aws_cdk.aws_lambda as _aws_cdk_aws_lambda_ceddda9d
38
+ import aws_cdk.aws_secretsmanager as _aws_cdk_aws_secretsmanager_ceddda9d
39
+ import constructs as _constructs_77d1e7e8
40
+
41
+
42
+ class LambdaToSecretsmanager(
43
+ _constructs_77d1e7e8.Construct,
44
+ metaclass=jsii.JSIIMeta,
45
+ jsii_type="@aws-solutions-constructs/aws-lambda-secretsmanager.LambdaToSecretsmanager",
46
+ ):
47
+ '''
48
+ :summary: The LambdaToSecretsmanager class.
49
+ '''
50
+
51
+ def __init__(
52
+ self,
53
+ scope: _constructs_77d1e7e8.Construct,
54
+ id: builtins.str,
55
+ *,
56
+ deploy_vpc: typing.Optional[builtins.bool] = None,
57
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
58
+ existing_secret_obj: typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.Secret] = None,
59
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
60
+ grant_write_access: typing.Optional[builtins.str] = None,
61
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
62
+ secret_environment_variable_name: typing.Optional[builtins.str] = None,
63
+ secret_props: typing.Optional[typing.Union[_aws_cdk_aws_secretsmanager_ceddda9d.SecretProps, typing.Dict[builtins.str, typing.Any]]] = None,
64
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
65
+ ) -> None:
66
+ '''
67
+ :param scope: - represents the scope for all the resources.
68
+ :param id: - this is a a scope-unique id.
69
+ :param deploy_vpc: Whether to deploy a new VPC. Default: - false
70
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
71
+ :param existing_secret_obj: Existing instance of Secret object, providing both this and secretProps will cause an error. Default: - Default props are used
72
+ :param existing_vpc: An existing VPC for the construct to use (construct will NOT create a new VPC in this case).
73
+ :param grant_write_access: Optional secret permissions to grant to the Lambda function. One of the following may be specified: "Read" or "ReadWrite". Default: - Read only access is given to the Lambda function if no value is specified.
74
+ :param lambda_function_props: User provided props to override the default props for the Lambda function. Default: - Default properties are used.
75
+ :param secret_environment_variable_name: Optional Name for the Lambda function environment variable set to the ARN of the secret. Default: - SECRET_ARN
76
+ :param secret_props: Optional user-provided props to override the default props for the Secret. Default: - Default props are used
77
+ :param vpc_props: Properties to override default properties if deployVpc is true.
78
+
79
+ :access: public
80
+ :summary: Constructs a new instance of the LambdaToSecretsmanager class.
81
+ '''
82
+ if __debug__:
83
+ type_hints = typing.get_type_hints(_typecheckingstub__444fb83809c5da8f4e91f86156cafd25a7ec722f3c37e439ea9d205271b23b12)
84
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
85
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
86
+ props = LambdaToSecretsmanagerProps(
87
+ deploy_vpc=deploy_vpc,
88
+ existing_lambda_obj=existing_lambda_obj,
89
+ existing_secret_obj=existing_secret_obj,
90
+ existing_vpc=existing_vpc,
91
+ grant_write_access=grant_write_access,
92
+ lambda_function_props=lambda_function_props,
93
+ secret_environment_variable_name=secret_environment_variable_name,
94
+ secret_props=secret_props,
95
+ vpc_props=vpc_props,
96
+ )
97
+
98
+ jsii.create(self.__class__, self, [scope, id, props])
99
+
100
+ @builtins.property
101
+ @jsii.member(jsii_name="lambdaFunction")
102
+ def lambda_function(self) -> _aws_cdk_aws_lambda_ceddda9d.Function:
103
+ return typing.cast(_aws_cdk_aws_lambda_ceddda9d.Function, jsii.get(self, "lambdaFunction"))
104
+
105
+ @builtins.property
106
+ @jsii.member(jsii_name="secret")
107
+ def secret(self) -> _aws_cdk_aws_secretsmanager_ceddda9d.Secret:
108
+ return typing.cast(_aws_cdk_aws_secretsmanager_ceddda9d.Secret, jsii.get(self, "secret"))
109
+
110
+ @builtins.property
111
+ @jsii.member(jsii_name="vpc")
112
+ def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
113
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], jsii.get(self, "vpc"))
114
+
115
+
116
+ @jsii.data_type(
117
+ jsii_type="@aws-solutions-constructs/aws-lambda-secretsmanager.LambdaToSecretsmanagerProps",
118
+ jsii_struct_bases=[],
119
+ name_mapping={
120
+ "deploy_vpc": "deployVpc",
121
+ "existing_lambda_obj": "existingLambdaObj",
122
+ "existing_secret_obj": "existingSecretObj",
123
+ "existing_vpc": "existingVpc",
124
+ "grant_write_access": "grantWriteAccess",
125
+ "lambda_function_props": "lambdaFunctionProps",
126
+ "secret_environment_variable_name": "secretEnvironmentVariableName",
127
+ "secret_props": "secretProps",
128
+ "vpc_props": "vpcProps",
129
+ },
130
+ )
131
+ class LambdaToSecretsmanagerProps:
132
+ def __init__(
133
+ self,
134
+ *,
135
+ deploy_vpc: typing.Optional[builtins.bool] = None,
136
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
137
+ existing_secret_obj: typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.Secret] = None,
138
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
139
+ grant_write_access: typing.Optional[builtins.str] = None,
140
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
141
+ secret_environment_variable_name: typing.Optional[builtins.str] = None,
142
+ secret_props: typing.Optional[typing.Union[_aws_cdk_aws_secretsmanager_ceddda9d.SecretProps, typing.Dict[builtins.str, typing.Any]]] = None,
143
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
144
+ ) -> None:
145
+ '''
146
+ :param deploy_vpc: Whether to deploy a new VPC. Default: - false
147
+ :param existing_lambda_obj: Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error. Default: - None
148
+ :param existing_secret_obj: Existing instance of Secret object, providing both this and secretProps will cause an error. Default: - Default props are used
149
+ :param existing_vpc: An existing VPC for the construct to use (construct will NOT create a new VPC in this case).
150
+ :param grant_write_access: Optional secret permissions to grant to the Lambda function. One of the following may be specified: "Read" or "ReadWrite". Default: - Read only access is given to the Lambda function if no value is specified.
151
+ :param lambda_function_props: User provided props to override the default props for the Lambda function. Default: - Default properties are used.
152
+ :param secret_environment_variable_name: Optional Name for the Lambda function environment variable set to the ARN of the secret. Default: - SECRET_ARN
153
+ :param secret_props: Optional user-provided props to override the default props for the Secret. Default: - Default props are used
154
+ :param vpc_props: Properties to override default properties if deployVpc is true.
155
+
156
+ :summary: The properties for the LambdaToSecretsmanager class.
157
+ '''
158
+ if isinstance(lambda_function_props, dict):
159
+ lambda_function_props = _aws_cdk_aws_lambda_ceddda9d.FunctionProps(**lambda_function_props)
160
+ if isinstance(secret_props, dict):
161
+ secret_props = _aws_cdk_aws_secretsmanager_ceddda9d.SecretProps(**secret_props)
162
+ if isinstance(vpc_props, dict):
163
+ vpc_props = _aws_cdk_aws_ec2_ceddda9d.VpcProps(**vpc_props)
164
+ if __debug__:
165
+ type_hints = typing.get_type_hints(_typecheckingstub__df69763c9616cce5c96cc24ad89f9f2342ec78081d7504421770c379d70520d0)
166
+ check_type(argname="argument deploy_vpc", value=deploy_vpc, expected_type=type_hints["deploy_vpc"])
167
+ check_type(argname="argument existing_lambda_obj", value=existing_lambda_obj, expected_type=type_hints["existing_lambda_obj"])
168
+ check_type(argname="argument existing_secret_obj", value=existing_secret_obj, expected_type=type_hints["existing_secret_obj"])
169
+ check_type(argname="argument existing_vpc", value=existing_vpc, expected_type=type_hints["existing_vpc"])
170
+ check_type(argname="argument grant_write_access", value=grant_write_access, expected_type=type_hints["grant_write_access"])
171
+ check_type(argname="argument lambda_function_props", value=lambda_function_props, expected_type=type_hints["lambda_function_props"])
172
+ check_type(argname="argument secret_environment_variable_name", value=secret_environment_variable_name, expected_type=type_hints["secret_environment_variable_name"])
173
+ check_type(argname="argument secret_props", value=secret_props, expected_type=type_hints["secret_props"])
174
+ check_type(argname="argument vpc_props", value=vpc_props, expected_type=type_hints["vpc_props"])
175
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
176
+ if deploy_vpc is not None:
177
+ self._values["deploy_vpc"] = deploy_vpc
178
+ if existing_lambda_obj is not None:
179
+ self._values["existing_lambda_obj"] = existing_lambda_obj
180
+ if existing_secret_obj is not None:
181
+ self._values["existing_secret_obj"] = existing_secret_obj
182
+ if existing_vpc is not None:
183
+ self._values["existing_vpc"] = existing_vpc
184
+ if grant_write_access is not None:
185
+ self._values["grant_write_access"] = grant_write_access
186
+ if lambda_function_props is not None:
187
+ self._values["lambda_function_props"] = lambda_function_props
188
+ if secret_environment_variable_name is not None:
189
+ self._values["secret_environment_variable_name"] = secret_environment_variable_name
190
+ if secret_props is not None:
191
+ self._values["secret_props"] = secret_props
192
+ if vpc_props is not None:
193
+ self._values["vpc_props"] = vpc_props
194
+
195
+ @builtins.property
196
+ def deploy_vpc(self) -> typing.Optional[builtins.bool]:
197
+ '''Whether to deploy a new VPC.
198
+
199
+ :default: - false
200
+ '''
201
+ result = self._values.get("deploy_vpc")
202
+ return typing.cast(typing.Optional[builtins.bool], result)
203
+
204
+ @builtins.property
205
+ def existing_lambda_obj(
206
+ self,
207
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function]:
208
+ '''Existing instance of Lambda Function object, providing both this and ``lambdaFunctionProps`` will cause an error.
209
+
210
+ :default: - None
211
+ '''
212
+ result = self._values.get("existing_lambda_obj")
213
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function], result)
214
+
215
+ @builtins.property
216
+ def existing_secret_obj(
217
+ self,
218
+ ) -> typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.Secret]:
219
+ '''Existing instance of Secret object, providing both this and secretProps will cause an error.
220
+
221
+ :default: - Default props are used
222
+ '''
223
+ result = self._values.get("existing_secret_obj")
224
+ return typing.cast(typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.Secret], result)
225
+
226
+ @builtins.property
227
+ def existing_vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
228
+ '''An existing VPC for the construct to use (construct will NOT create a new VPC in this case).'''
229
+ result = self._values.get("existing_vpc")
230
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
231
+
232
+ @builtins.property
233
+ def grant_write_access(self) -> typing.Optional[builtins.str]:
234
+ '''Optional secret permissions to grant to the Lambda function.
235
+
236
+ One of the following may be specified: "Read" or "ReadWrite".
237
+
238
+ :default: - Read only access is given to the Lambda function if no value is specified.
239
+ '''
240
+ result = self._values.get("grant_write_access")
241
+ return typing.cast(typing.Optional[builtins.str], result)
242
+
243
+ @builtins.property
244
+ def lambda_function_props(
245
+ self,
246
+ ) -> typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps]:
247
+ '''User provided props to override the default props for the Lambda function.
248
+
249
+ :default: - Default properties are used.
250
+ '''
251
+ result = self._values.get("lambda_function_props")
252
+ return typing.cast(typing.Optional[_aws_cdk_aws_lambda_ceddda9d.FunctionProps], result)
253
+
254
+ @builtins.property
255
+ def secret_environment_variable_name(self) -> typing.Optional[builtins.str]:
256
+ '''Optional Name for the Lambda function environment variable set to the ARN of the secret.
257
+
258
+ :default: - SECRET_ARN
259
+ '''
260
+ result = self._values.get("secret_environment_variable_name")
261
+ return typing.cast(typing.Optional[builtins.str], result)
262
+
263
+ @builtins.property
264
+ def secret_props(
265
+ self,
266
+ ) -> typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.SecretProps]:
267
+ '''Optional user-provided props to override the default props for the Secret.
268
+
269
+ :default: - Default props are used
270
+ '''
271
+ result = self._values.get("secret_props")
272
+ return typing.cast(typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.SecretProps], result)
273
+
274
+ @builtins.property
275
+ def vpc_props(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.VpcProps]:
276
+ '''Properties to override default properties if deployVpc is true.'''
277
+ result = self._values.get("vpc_props")
278
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.VpcProps], result)
279
+
280
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
281
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
282
+
283
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
284
+ return not (rhs == self)
285
+
286
+ def __repr__(self) -> str:
287
+ return "LambdaToSecretsmanagerProps(%s)" % ", ".join(
288
+ k + "=" + repr(v) for k, v in self._values.items()
289
+ )
290
+
291
+
292
+ __all__ = [
293
+ "LambdaToSecretsmanager",
294
+ "LambdaToSecretsmanagerProps",
295
+ ]
296
+
297
+ publication.publish()
298
+
299
+ def _typecheckingstub__444fb83809c5da8f4e91f86156cafd25a7ec722f3c37e439ea9d205271b23b12(
300
+ scope: _constructs_77d1e7e8.Construct,
301
+ id: builtins.str,
302
+ *,
303
+ deploy_vpc: typing.Optional[builtins.bool] = None,
304
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
305
+ existing_secret_obj: typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.Secret] = None,
306
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
307
+ grant_write_access: typing.Optional[builtins.str] = None,
308
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
309
+ secret_environment_variable_name: typing.Optional[builtins.str] = None,
310
+ secret_props: typing.Optional[typing.Union[_aws_cdk_aws_secretsmanager_ceddda9d.SecretProps, typing.Dict[builtins.str, typing.Any]]] = None,
311
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
312
+ ) -> None:
313
+ """Type checking stubs"""
314
+ pass
315
+
316
+ def _typecheckingstub__df69763c9616cce5c96cc24ad89f9f2342ec78081d7504421770c379d70520d0(
317
+ *,
318
+ deploy_vpc: typing.Optional[builtins.bool] = None,
319
+ existing_lambda_obj: typing.Optional[_aws_cdk_aws_lambda_ceddda9d.Function] = None,
320
+ existing_secret_obj: typing.Optional[_aws_cdk_aws_secretsmanager_ceddda9d.Secret] = None,
321
+ existing_vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
322
+ grant_write_access: typing.Optional[builtins.str] = None,
323
+ lambda_function_props: typing.Optional[typing.Union[_aws_cdk_aws_lambda_ceddda9d.FunctionProps, typing.Dict[builtins.str, typing.Any]]] = None,
324
+ secret_environment_variable_name: typing.Optional[builtins.str] = None,
325
+ secret_props: typing.Optional[typing.Union[_aws_cdk_aws_secretsmanager_ceddda9d.SecretProps, typing.Dict[builtins.str, typing.Any]]] = None,
326
+ vpc_props: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.VpcProps, typing.Dict[builtins.str, typing.Any]]] = None,
327
+ ) -> None:
328
+ """Type checking stubs"""
329
+ 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-lambda-secretsmanager",
37
+ "2.95.0",
38
+ __name__[0:-6],
39
+ "aws-lambda-secretsmanager@2.95.0.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-lambda-secretsmanager
3
+ Version: 2.95.0
4
+ Summary: CDK constructs for defining an interaction between an AWS Lambda function and AWS Secrets Manager.
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.0
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-lambda-secretsmanager/README.adoc)
@@ -11,4 +11,4 @@ src/aws_solutions_constructs.aws_lambda_secretsmanager.egg-info/top_level.txt
11
11
  src/aws_solutions_constructs/aws_lambda_secretsmanager/__init__.py
12
12
  src/aws_solutions_constructs/aws_lambda_secretsmanager/py.typed
13
13
  src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/__init__.py
14
- src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/aws-lambda-secretsmanager@1.128.0.jsii.tgz
14
+ src/aws_solutions_constructs/aws_lambda_secretsmanager/_jsii/aws-lambda-secretsmanager@2.95.0.jsii.tgz
@@ -0,0 +1,6 @@
1
+ aws-cdk-lib<3.0.0,>=2.223.0
2
+ aws-solutions-constructs.core==2.95.0
3
+ constructs<11.0.0,>=10.0.0
4
+ jsii<2.0.0,>=1.119.0
5
+ publication>=0.0.3
6
+ typeguard<4.3.0,>=2.13.3
@@ -1,136 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aws-solutions-constructs.aws-lambda-secretsmanager
3
- Version: 1.128.0
4
- Summary: CDK constructs for defining an interaction between an AWS Lambda function and AWS Secrets Manager.
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
- Platform: UNKNOWN
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Operating System :: OS Independent
12
- Classifier: Programming Language :: JavaScript
13
- Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: Programming Language :: Python :: 3.6
15
- Classifier: Programming Language :: Python :: 3.7
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Typing :: Typed
19
- Classifier: License :: OSI Approved
20
- Requires-Python: >=3.6
21
- Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
-
24
- # aws-lambda-secretsmanager module
25
-
26
- <!--BEGIN STABILITY BANNER-->---
27
-
28
-
29
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
30
-
31
- > All classes are under active development and subject to non-backward compatible changes or removal in any
32
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
33
- > 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.
34
-
35
- ---
36
- <!--END STABILITY BANNER-->
37
-
38
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
39
- |:-------------|:-------------|
40
-
41
- <div style="height:8px"></div>
42
-
43
- | **Language** | **Package** |
44
- |:-------------|-----------------|
45
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_secretsmanager`|
46
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-secretsmanager`|
47
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdasecretsmanager`|
48
-
49
- This AWS Solutions Construct implements the AWS Lambda function and AWS Secrets Manager secret with the least privileged permissions.
50
-
51
- Here is a minimal deployable pattern definition in Typescript:
52
-
53
- ```javascript
54
- const { LambdaToSecretsmanagerProps, LambdaToSecretsmanager } from '@aws-solutions-constructs/aws-lambda-secretsmanager';
55
-
56
- const props: LambdaToSecretsmanagerProps = {
57
- lambdaFunctionProps: {
58
- runtime: lambda.Runtime.NODEJS_14_X,
59
- // This assumes a handler function in lib/lambda/index.js
60
- code: lambda.Code.fromAsset(`${__dirname}/lambda`),
61
- handler: 'index.handler'
62
- },
63
- };
64
-
65
- new LambdaToSecretsmanager(this, 'test-lambda-secretsmanager-stack', props);
66
-
67
- ```
68
-
69
- ## Initializer
70
-
71
- ```text
72
- new LambdaToSecretsmanager(scope: Construct, id: string, props: LambdaToSecretsmanagerProps);
73
- ```
74
-
75
- *Parameters*
76
-
77
- * scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
78
- * id `string`
79
- * props [`LambdaToSecretsmanagerProps`](#pattern-construct-props)
80
-
81
- ## Pattern Construct Props
82
-
83
- | **Name** | **Type** | **Description** |
84
- |:-------------|:----------------|-----------------|
85
- |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.|
86
- |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.|
87
- |secretProps?|[`secretsmanager.SecretProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.SecretProps.html)|Optional user provided props to override the default props for Secrets Manager|
88
- |existingSecretObj?|[`secretsmanager.Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html)|Existing instance of Secrets Manager Secret object, If this is set then the secretProps is ignored|
89
- |grantWriteAccess?|`boolean`|Optional write access to the Secret for the Lambda function (Read-Only by default)
90
- |secretEnvironmentVariableName?|`string`|Optional Name for the Secrets Manager secret environment variable set for the Lambda function.|
91
- |existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.IVpc.html)|An optional, existing VPC into which this pattern should be deployed. When deployed in a VPC, the Lambda function will use ENIs in the VPC to access network resources and an Interface Endpoint will be created in the VPC for AWS Secrets Manager. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|
92
- |vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.VpcProps.html)|Optional user-provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overrriden. If `deployVpc` is not `true` then this property will be ignored.|
93
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
94
-
95
- ## Pattern Properties
96
-
97
- | **Name** | **Type** | **Description** |
98
- |:-------------|:----------------|-----------------|
99
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Returns an instance of lambda.Function created by the construct|
100
- |secret|[`secretsmanager.Secret`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html)|Returns an instance of secretsmanager.Secret created by the construct|
101
- |vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.IVpc.html)|Returns an interface on the VPC used by the pattern (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|
102
-
103
- ## Default settings
104
-
105
- Out of the box implementation of the Construct without any override will set the following defaults:
106
-
107
- ### AWS Lambda Function
108
-
109
- * Configure limited privilege access IAM role for Lambda function
110
- * Enable reusing connections with Keep-Alive for NodeJs Lambda function
111
- * Enable X-Ray Tracing
112
- * Set Environment Variables
113
-
114
- * (default) SECRET_ARN containing the ARN of the secret as return by CDK [secretArn property](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-secretsmanager.Secret.html#secretarn).
115
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)
116
-
117
- ### Amazon SecretsManager Secret
118
-
119
- * Enable read-only access for the associated AWS Lambda Function
120
- * Enable server-side encryption using a default KMS key for the account and region
121
- * Creates a new Secret
122
-
123
- * (default) random name
124
- * (default) random value
125
- * Retain the Secret when deleting the CloudFormation stack
126
-
127
- ## Architecture
128
-
129
- ![Architecture Diagram](architecture.png)
130
-
131
- ---
132
-
133
-
134
- © Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
135
-
136
-