@aws-cdk/aws-lambda-python-alpha 2.0.0-rc.23

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.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,2 @@
1
+ AWS Cloud Development Kit (AWS CDK)
2
+ Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # Amazon Lambda Python Library
2
+
3
+ <!--BEGIN STABILITY BANNER-->
4
+
5
+ ---
6
+
7
+ ![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)
8
+
9
+ > The APIs of higher level constructs in this module are experimental and under active development.
10
+ > They are subject to non-backward compatible changes or removal in any future version. These are
11
+ > not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
12
+ > announced in the release notes. This means that while you may use them, you may need to update
13
+ > your source code when upgrading to a newer version of this package.
14
+
15
+ ---
16
+
17
+ <!--END STABILITY BANNER-->
18
+
19
+ This library provides constructs for Python Lambda functions.
20
+
21
+ To use this module, you will need to have Docker installed.
22
+
23
+ ## Python Function
24
+
25
+ Define a `PythonFunction`:
26
+
27
+ ```ts
28
+ import * as lambda from "@aws-cdk/aws-lambda";
29
+ import { PythonFunction } from "@aws-cdk/aws-lambda-python";
30
+
31
+ new PythonFunction(this, 'MyFunction', {
32
+ entry: '/path/to/my/function', // required
33
+ index: 'my_index.py', // optional, defaults to 'index.py'
34
+ handler: 'my_exported_func', // optional, defaults to 'handler'
35
+ runtime: lambda.Runtime.PYTHON_3_6, // optional, defaults to lambda.Runtime.PYTHON_3_7
36
+ });
37
+ ```
38
+
39
+ All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-lambda).
40
+
41
+ ## Module Dependencies
42
+
43
+ If `requirements.txt` or `Pipfile` exists at the entry path, the construct will handle installing
44
+ all required modules in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-python3.7)
45
+ according to the `runtime` and with the Docker platform based on the target architecture of the Lambda function.
46
+
47
+ Python bundles are only recreated and published when a file in a source directory has changed.
48
+ Therefore (and as a general best-practice), it is highly recommended to commit a lockfile with a
49
+ list of all transitive dependencies and their exact versions.
50
+ This will ensure that when any dependency version is updated, the bundle asset is recreated and uploaded.
51
+
52
+ To that end, we recommend using [`pipenv`] or [`poetry`] which has lockfile support.
53
+
54
+ [`pipenv`]: https://pipenv-fork.readthedocs.io/en/latest/basics.html#example-pipfile-lock
55
+ [`poetry`]: https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
56
+
57
+ **Lambda with a requirements.txt**
58
+
59
+ ```plaintext
60
+ .
61
+ ├── lambda_function.py # exports a function named 'handler'
62
+ ├── requirements.txt # has to be present at the entry path
63
+ ```
64
+
65
+ **Lambda with a Pipfile**
66
+
67
+ ```plaintext
68
+ .
69
+ ├── lambda_function.py # exports a function named 'handler'
70
+ ├── Pipfile # has to be present at the entry path
71
+ ├── Pipfile.lock # your lock file
72
+ ```
73
+
74
+ **Lambda with a poetry.lock**
75
+
76
+ ```plaintext
77
+ .
78
+ ├── lambda_function.py # exports a function named 'handler'
79
+ ├── pyproject.toml # has to be present at the entry path
80
+ ├── poetry.lock # your poetry lock file
81
+ ```
82
+
83
+ **Lambda Layer Support**
84
+
85
+ You may create a python-based lambda layer with `PythonLayerVersion`. If `PythonLayerVersion` detects a `requirements.txt`
86
+ or `Pipfile` or `poetry.lock` with the associated `pyproject.toml` at the entry path, then `PythonLayerVersion` will include the dependencies inline with your code in the
87
+ layer.
88
+
89
+ ```ts
90
+ new lambda.PythonFunction(this, 'MyFunction', {
91
+ entry: '/path/to/my/function',
92
+ layers: [
93
+ new lambda.PythonLayerVersion(this, 'MyLayer', {
94
+ entry: '/path/to/my/layer', // point this to your library's directory
95
+ }),
96
+ ],
97
+ });
98
+ ```
package/lib/Dockerfile ADDED
@@ -0,0 +1,9 @@
1
+ # The correct AWS SAM build image based on the runtime of the function will be
2
+ # passed as build arg. The default allows to do `docker build .` when testing.
3
+ ARG IMAGE=public.ecr.aws/sam/build-python3.7
4
+ FROM $IMAGE
5
+
6
+ # Ensure rsync is installed
7
+ RUN yum -q list installed rsync &>/dev/null || yum install -y rsync
8
+
9
+ CMD [ "python" ]
@@ -0,0 +1,22 @@
1
+ # The correct AWS SAM build image based on the runtime of the function will be
2
+ # passed as build arg. The default allows to do `docker build .` when testing.
3
+ ARG IMAGE=public.ecr.aws/sam/build-python3.7
4
+ FROM $IMAGE
5
+
6
+ # Ensure rsync is installed
7
+ RUN yum -q list installed rsync &>/dev/null || yum install -y rsync
8
+
9
+ # Upgrade pip (required by cryptography v3.4 and above, which is a dependency of poetry)
10
+ RUN pip install --upgrade pip
11
+
12
+ # Install pipenv and poetry so we can create a requirements.txt if we detect pipfile or poetry.lock respectively
13
+ RUN pip install pipenv poetry
14
+
15
+ # Install the dependencies in a cacheable layer
16
+ WORKDIR /var/dependencies
17
+ COPY Pipfile* pyproject* poetry* requirements.tx[t] ./
18
+ RUN [ -f 'Pipfile' ] && pipenv lock -r >requirements.txt; \
19
+ [ -f 'poetry.lock' ] && poetry export --with-credentials --format requirements.txt --output requirements.txt; \
20
+ [ -f 'requirements.txt' ] && pip install -r requirements.txt -t .;
21
+
22
+ CMD [ "python" ]
@@ -0,0 +1,78 @@
1
+ import * as lambda from 'aws-cdk-lib/aws-lambda';
2
+ import * as cdk from 'aws-cdk-lib';
3
+ /**
4
+ * Dependency files to exclude from the asset hash.
5
+ */
6
+ export declare const DEPENDENCY_EXCLUDES: string[];
7
+ /**
8
+ * The location in the image that the bundler image caches dependencies.
9
+ */
10
+ export declare const BUNDLER_DEPENDENCIES_CACHE = "/var/dependencies";
11
+ /**
12
+ * Options for bundling
13
+ */
14
+ export interface BundlingOptions {
15
+ /**
16
+ * Entry path
17
+ */
18
+ readonly entry: string;
19
+ /**
20
+ * The runtime of the lambda function
21
+ */
22
+ readonly runtime: lambda.Runtime;
23
+ /**
24
+ * The system architecture of the lambda function
25
+ */
26
+ readonly architecture: lambda.Architecture;
27
+ /**
28
+ * Output path suffix ('python' for a layer, '.' otherwise)
29
+ */
30
+ readonly outputPathSuffix: string;
31
+ /**
32
+ * Determines how asset hash is calculated. Assets will get rebuild and
33
+ * uploaded only if their hash has changed.
34
+ *
35
+ * If asset hash is set to `SOURCE` (default), then only changes to the source
36
+ * directory will cause the asset to rebuild. This means, for example, that in
37
+ * order to pick up a new dependency version, a change must be made to the
38
+ * source tree. Ideally, this can be implemented by including a dependency
39
+ * lockfile in your source tree or using fixed dependencies.
40
+ *
41
+ * If the asset hash is set to `OUTPUT`, the hash is calculated after
42
+ * bundling. This means that any change in the output will cause the asset to
43
+ * be invalidated and uploaded. Bear in mind that `pip` adds timestamps to
44
+ * dependencies it installs, which implies that in this mode Python bundles
45
+ * will _always_ get rebuild and uploaded. Normally this is an anti-pattern
46
+ * since build
47
+ *
48
+ * @default AssetHashType.SOURCE By default, hash is calculated based on the
49
+ * contents of the source directory. If `assetHash` is also specified, the
50
+ * default is `CUSTOM`. This means that only updates to the source will cause
51
+ * the asset to rebuild.
52
+ */
53
+ readonly assetHashType?: cdk.AssetHashType;
54
+ /**
55
+ * Specify a custom hash for this asset. If `assetHashType` is set it must
56
+ * be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will
57
+ * be SHA256 hashed and encoded as hex. The resulting hash will be the asset
58
+ * hash.
59
+ *
60
+ * NOTE: the hash is used in order to identify a specific revision of the asset, and
61
+ * used for optimizing and caching deployment activities related to this asset such as
62
+ * packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will
63
+ * need to make sure it is updated every time the asset changes, or otherwise it is
64
+ * possible that some deployments will not be invalidated.
65
+ *
66
+ * @default - based on `assetHashType`
67
+ */
68
+ readonly assetHash?: string;
69
+ }
70
+ /**
71
+ * Produce bundled Lambda asset code
72
+ */
73
+ export declare function bundle(options: BundlingOptions): lambda.Code;
74
+ /**
75
+ * Checks to see if the `entry` directory contains a type of dependency that
76
+ * we know how to install.
77
+ */
78
+ export declare function stageDependencies(entry: string, stagedir: string): boolean;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stageDependencies = exports.bundle = exports.BUNDLER_DEPENDENCIES_CACHE = exports.DEPENDENCY_EXCLUDES = void 0;
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ const lambda = require("aws-cdk-lib/aws-lambda");
7
+ const cdk = require("aws-cdk-lib");
8
+ /**
9
+ * Dependency files to exclude from the asset hash.
10
+ */
11
+ exports.DEPENDENCY_EXCLUDES = ['*.pyc'];
12
+ /**
13
+ * The location in the image that the bundler image caches dependencies.
14
+ */
15
+ exports.BUNDLER_DEPENDENCIES_CACHE = '/var/dependencies';
16
+ /**
17
+ * Produce bundled Lambda asset code
18
+ */
19
+ function bundle(options) {
20
+ const { entry, runtime, architecture, outputPathSuffix } = options;
21
+ const stagedir = cdk.FileSystem.mkdtemp('python-bundling-');
22
+ const hasDeps = stageDependencies(entry, stagedir);
23
+ const depsCommand = chain([
24
+ hasDeps ? `rsync -r ${exports.BUNDLER_DEPENDENCIES_CACHE}/. ${cdk.AssetStaging.BUNDLING_OUTPUT_DIR}/${outputPathSuffix}` : '',
25
+ `rsync -r . ${cdk.AssetStaging.BUNDLING_OUTPUT_DIR}/${outputPathSuffix}`,
26
+ ]);
27
+ // Determine which dockerfile to use. When dependencies are present, we use a
28
+ // Dockerfile that can create a cacheable layer. We can't use this Dockerfile
29
+ // if there aren't dependencies or the Dockerfile will complain about missing
30
+ // sources.
31
+ const dockerfile = hasDeps
32
+ ? 'Dockerfile.dependencies'
33
+ : 'Dockerfile';
34
+ // copy Dockerfile to workdir
35
+ fs.copyFileSync(path.join(__dirname, dockerfile), path.join(stagedir, dockerfile));
36
+ const image = cdk.DockerImage.fromBuild(stagedir, {
37
+ buildArgs: {
38
+ IMAGE: runtime.bundlingImage.image,
39
+ },
40
+ platform: architecture.dockerPlatform,
41
+ file: dockerfile,
42
+ });
43
+ return lambda.Code.fromAsset(entry, {
44
+ assetHashType: options.assetHashType,
45
+ assetHash: options.assetHash,
46
+ exclude: exports.DEPENDENCY_EXCLUDES,
47
+ bundling: {
48
+ image,
49
+ command: ['bash', '-c', depsCommand],
50
+ },
51
+ });
52
+ }
53
+ exports.bundle = bundle;
54
+ /**
55
+ * Checks to see if the `entry` directory contains a type of dependency that
56
+ * we know how to install.
57
+ */
58
+ function stageDependencies(entry, stagedir) {
59
+ const prefixes = [
60
+ 'Pipfile',
61
+ 'pyproject',
62
+ 'poetry',
63
+ 'requirements.txt',
64
+ ];
65
+ let found = false;
66
+ for (const file of fs.readdirSync(entry)) {
67
+ for (const prefix of prefixes) {
68
+ if (file.startsWith(prefix)) {
69
+ fs.copyFileSync(path.join(entry, file), path.join(stagedir, file));
70
+ found = true;
71
+ }
72
+ }
73
+ }
74
+ return found;
75
+ }
76
+ exports.stageDependencies = stageDependencies;
77
+ function chain(commands) {
78
+ return commands.filter(c => !!c).join(' && ');
79
+ }
80
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJidW5kbGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5QkFBeUI7QUFDekIsNkJBQTZCO0FBQzdCLGlEQUFpRDtBQUNqRCxtQ0FBbUM7QUFFbkM7O0dBRUc7QUFDVSxRQUFBLG1CQUFtQixHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0M7O0dBRUc7QUFDVSxRQUFBLDBCQUEwQixHQUFHLG1CQUFtQixDQUFDO0FBbUU5RDs7R0FFRztBQUNILFNBQW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peGVzID0gW1xuICAgICdQaXBmaWxlJyxcbiAgICAncHlwcm9qZWN0JyxcbiAgICAncG9ldHJ5JyxcbiAgICAncmVxdWlyZW1lbnRzLnR4dCcsXG4gIF07XG5cbiAgbGV0IGZvdW5kID0gZmFsc2U7XG4gIGZvciAoY29uc3QgZmlsZSBvZiBmcy5yZWFkZGlyU3luYyhlbnRyeSkpIHtcbiAgICBmb3IgKGNvbnN0IHByZWZpeCBvZiBwcmVmaXhlcykge1xuICAgICAgaWYgKGZpbGUuc3RhcnRzV2l0aChwcmVmaXgpKSB7XG4gICAgICAgIGZzLmNvcHlGaWxlU3luYyhwYXRoLmpvaW4oZW50cnksIGZpbGUpLCBwYXRoLmpvaW4oc3RhZ2VkaXIsIGZpbGUpKTtcbiAgICAgICAgZm91bmQgPSB0cnVlO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBmb3VuZDtcbn1cblxuZnVuY3Rpb24gY2hhaW4oY29tbWFuZHM6IHN0cmluZ1tdKTogc3RyaW5nIHtcbiAgcmV0dXJuIGNvbW1hbmRzLmZpbHRlcihjID0+ICEhYykuam9pbignICYmICcpO1xufVxuIl19
@@ -0,0 +1,91 @@
1
+ import * as lambda from 'aws-cdk-lib/aws-lambda';
2
+ import { AssetHashType } from 'aws-cdk-lib';
3
+ import { Construct } from 'constructs';
4
+ /**
5
+ * (experimental) Properties for a PythonFunction.
6
+ *
7
+ * @experimental
8
+ */
9
+ export interface PythonFunctionProps extends lambda.FunctionOptions {
10
+ /**
11
+ * (experimental) The path to the root directory of the function.
12
+ *
13
+ * @experimental
14
+ */
15
+ readonly entry: string;
16
+ /**
17
+ * (experimental) The path (relative to entry) to the index file containing the exported handler.
18
+ *
19
+ * @default index.py
20
+ * @experimental
21
+ */
22
+ readonly index?: string;
23
+ /**
24
+ * (experimental) The name of the exported handler in the index file.
25
+ *
26
+ * @default handler
27
+ * @experimental
28
+ */
29
+ readonly handler?: string;
30
+ /**
31
+ * (experimental) The runtime environment.
32
+ *
33
+ * Only runtimes of the Python family are
34
+ * supported.
35
+ *
36
+ * @default lambda.Runtime.PYTHON_3_7
37
+ * @experimental
38
+ */
39
+ readonly runtime?: lambda.Runtime;
40
+ /**
41
+ * (experimental) Determines how asset hash is calculated. Assets will get rebuild and uploaded only if their hash has changed.
42
+ *
43
+ * If asset hash is set to `SOURCE` (default), then only changes to the source
44
+ * directory will cause the asset to rebuild. This means, for example, that in
45
+ * order to pick up a new dependency version, a change must be made to the
46
+ * source tree. Ideally, this can be implemented by including a dependency
47
+ * lockfile in your source tree or using fixed dependencies.
48
+ *
49
+ * If the asset hash is set to `OUTPUT`, the hash is calculated after
50
+ * bundling. This means that any change in the output will cause the asset to
51
+ * be invalidated and uploaded. Bear in mind that `pip` adds timestamps to
52
+ * dependencies it installs, which implies that in this mode Python bundles
53
+ * will _always_ get rebuild and uploaded. Normally this is an anti-pattern
54
+ * since build
55
+ *
56
+ * @default AssetHashType.SOURCE By default, hash is calculated based on the
57
+ * contents of the source directory. This means that only updates to the
58
+ * source will cause the asset to rebuild.
59
+ * @experimental
60
+ */
61
+ readonly assetHashType?: AssetHashType;
62
+ /**
63
+ * (experimental) Specify a custom hash for this asset.
64
+ *
65
+ * If `assetHashType` is set it must
66
+ * be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will
67
+ * be SHA256 hashed and encoded as hex. The resulting hash will be the asset
68
+ * hash.
69
+ *
70
+ * NOTE: the hash is used in order to identify a specific revision of the asset, and
71
+ * used for optimizing and caching deployment activities related to this asset such as
72
+ * packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will
73
+ * need to make sure it is updated every time the asset changes, or otherwise it is
74
+ * possible that some deployments will not be invalidated.
75
+ *
76
+ * @default - based on `assetHashType`
77
+ * @experimental
78
+ */
79
+ readonly assetHash?: string;
80
+ }
81
+ /**
82
+ * (experimental) A Python Lambda function.
83
+ *
84
+ * @experimental
85
+ */
86
+ export declare class PythonFunction extends lambda.Function {
87
+ /**
88
+ * @experimental
89
+ */
90
+ constructor(scope: Construct, id: string, props: PythonFunctionProps);
91
+ }