@aws-cdk/aws-lambda-python-alpha 2.25.0-alpha.0 → 2.28.0-alpha.0
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/.jsii +26 -13
- package/.jsii.tabl.json +37 -25
- package/README.md +1 -1
- package/lib/bundling.js +3 -4
- package/lib/function.d.ts +1 -1
- package/lib/function.js +3 -3
- package/lib/layer.d.ts +1 -1
- package/lib/layer.js +5 -6
- package/package.json +8 -8
package/.jsii
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"aws-cdk-lib": "^2.28.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -1107,6 +1107,19 @@
|
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
},
|
|
1110
|
+
"aws-cdk-lib.aws_emrserverless": {
|
|
1111
|
+
"targets": {
|
|
1112
|
+
"dotnet": {
|
|
1113
|
+
"namespace": "Amazon.CDK.AWS.EMRServerless"
|
|
1114
|
+
},
|
|
1115
|
+
"java": {
|
|
1116
|
+
"package": "software.amazon.awscdk.services.emrserverless"
|
|
1117
|
+
},
|
|
1118
|
+
"python": {
|
|
1119
|
+
"module": "aws_cdk.aws_emrserverless"
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1110
1123
|
"aws-cdk-lib.aws_events": {
|
|
1111
1124
|
"targets": {
|
|
1112
1125
|
"dotnet": {
|
|
@@ -2943,7 +2956,7 @@
|
|
|
2943
2956
|
},
|
|
2944
2957
|
"targets": {
|
|
2945
2958
|
"dotnet": {
|
|
2946
|
-
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/
|
|
2959
|
+
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png",
|
|
2947
2960
|
"namespace": "Amazon.CDK",
|
|
2948
2961
|
"packageId": "Amazon.CDK.Lib"
|
|
2949
2962
|
},
|
|
@@ -2998,7 +3011,7 @@
|
|
|
2998
3011
|
"stability": "experimental"
|
|
2999
3012
|
},
|
|
3000
3013
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
3001
|
-
"jsiiVersion": "1.
|
|
3014
|
+
"jsiiVersion": "1.60.1 (build 2799dc8)",
|
|
3002
3015
|
"keywords": [
|
|
3003
3016
|
"aws",
|
|
3004
3017
|
"cdk",
|
|
@@ -3019,7 +3032,7 @@
|
|
|
3019
3032
|
},
|
|
3020
3033
|
"name": "@aws-cdk/aws-lambda-python-alpha",
|
|
3021
3034
|
"readme": {
|
|
3022
|
-
"markdown": "# Amazon Lambda Python Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nThis library provides constructs for Python Lambda functions.\n\nTo use this module, you will need to have Docker installed.\n\n## Python Function\n\nDefine a `PythonFunction`:\n\n```ts\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n runtime: Runtime.PYTHON_3_8, // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n});\n```\n\nAll other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/
|
|
3035
|
+
"markdown": "# Amazon Lambda Python Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nThis library provides constructs for Python Lambda functions.\n\nTo use this module, you will need to have Docker installed.\n\n## Python Function\n\nDefine a `PythonFunction`:\n\n```ts\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n runtime: Runtime.PYTHON_3_8, // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n});\n```\n\nAll other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/aws-lambda).\n\n## Python Layer\n\nYou may create a python-based lambda layer with `PythonLayerVersion`. If `PythonLayerVersion` detects a `requirements.txt`\nor `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\nlayer.\n\nDefine a `PythonLayerVersion`:\n\n```ts\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n```\n\nA layer can also be used as a part of a `PythonFunction`:\n\n```ts\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n runtime: Runtime.PYTHON_3_8,\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});\n```\n\n## Packaging\n\nIf `requirements.txt`, `Pipfile` or `poetry.lock` exists at the entry path, the construct will handle installing all required modules in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-python3.7) according to the `runtime` and with the Docker platform based on the target architecture of the Lambda function.\n\nPython bundles are only recreated and published when a file in a source directory has changed.\nTherefore (and as a general best-practice), it is highly recommended to commit a lockfile with a\nlist of all transitive dependencies and their exact versions. This will ensure that when any dependency version is updated, the bundle asset is recreated and uploaded.\n\nTo that end, we recommend using [`pipenv`] or [`poetry`] which have lockfile support.\n\n- [`pipenv`](https://pipenv-fork.readthedocs.io/en/latest/basics.html#example-pipfile-lock)\n- [`poetry`](https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control)\n\nPackaging is executed using the `Packaging` class, which:\n\n1. Infers the packaging type based on the files present.\n2. If it sees a `Pipfile` or a `poetry.lock` file, it exports it to a compatible `requirements.txt` file with credentials (if they're available in the source files or in the bundling container).\n3. Installs dependencies using `pip`.\n4. Copies the dependencies into an asset that is bundled for the Lambda package.\n\n**Lambda with a requirements.txt**\n\n```plaintext\n.\n├── lambda_function.py # exports a function named 'handler'\n├── requirements.txt # has to be present at the entry path\n```\n\n**Lambda with a Pipfile**\n\n```plaintext\n.\n├── lambda_function.py # exports a function named 'handler'\n├── Pipfile # has to be present at the entry path\n├── Pipfile.lock # your lock file\n```\n\n**Lambda with a poetry.lock**\n\n```plaintext\n.\n├── lambda_function.py # exports a function named 'handler'\n├── pyproject.toml # your poetry project definition\n├── poetry.lock # your poetry lock file has to be present at the entry path\n```\n\n## Custom Bundling\n\nCustom bundling can be performed by passing in additional build arguments that point to index URLs to private repos, or by using an entirely custom Docker images for bundling dependencies. The build args currently supported are:\n\n- `PIP_INDEX_URL`\n- `PIP_EXTRA_INDEX_URL`\n- `HTTPS_PROXY`\n\nAdditional build args for bundling that refer to PyPI indexes can be specified as:\n\n```ts\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n```\n\nIf using a custom Docker image for bundling, the dependencies are installed with `pip`, `pipenv` or `poetry` by using the `Packaging` class. A different bundling Docker image that is in the same directory as the function can be specified as:\n\n ```ts\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: { image },\n});\n```\n\n## Custom Bundling with Code Artifact\n\nTo use a Code Artifact PyPI repo, the `PIP_INDEX_URL` for bundling the function can be customized (requires AWS CLI in the build environment):\n\n```ts\nimport { execSync } from 'child_process';\n\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nconst domain = 'my-domain';\nconst domainOwner = '111122223333';\nconst repoName = 'my_repo';\nconst region = 'us-east-1';\nconst codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim();\n\nconst indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`;\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n environment: { PIP_INDEX_URL: indexUrl },\n },\n});\n```\n\nThe index URL or the token are only used during bundling and thus not included in the final asset. Setting only environment variable for `PIP_INDEX_URL` or `PIP_EXTRA_INDEX_URL` should work for accesing private Python repositories with `pip`, `pipenv` and `poetry` based dependencies.\n\nIf you also want to use the Code Artifact repo for building the base Docker image for bundling, use `buildArgs`. However, note that setting custom build args for bundling will force the base bundling image to be rebuilt every time (i.e. skip the Docker cache). Build args can be customized as:\n\n```ts\nimport { execSync } from 'child_process';\n\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nconst domain = 'my-domain';\nconst domainOwner = '111122223333';\nconst repoName = 'my_repo';\nconst region = 'us-east-1';\nconst codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim();\n\nconst indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`;\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});\n```\n"
|
|
3023
3036
|
},
|
|
3024
3037
|
"repository": {
|
|
3025
3038
|
"directory": "packages/individual-packages/aws-lambda-python",
|
|
@@ -3029,7 +3042,7 @@
|
|
|
3029
3042
|
"schema": "jsii/0.10.0",
|
|
3030
3043
|
"targets": {
|
|
3031
3044
|
"dotnet": {
|
|
3032
|
-
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/
|
|
3045
|
+
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png",
|
|
3033
3046
|
"namespace": "Amazon.CDK.AWS.Lambda.Python.Alpha",
|
|
3034
3047
|
"packageId": "Amazon.CDK.AWS.Lambda.Python.Alpha"
|
|
3035
3048
|
},
|
|
@@ -3382,7 +3395,7 @@
|
|
|
3382
3395
|
},
|
|
3383
3396
|
"locationInModule": {
|
|
3384
3397
|
"filename": "lib/layer.ts",
|
|
3385
|
-
"line":
|
|
3398
|
+
"line": 43
|
|
3386
3399
|
},
|
|
3387
3400
|
"parameters": [
|
|
3388
3401
|
{
|
|
@@ -3408,7 +3421,7 @@
|
|
|
3408
3421
|
"kind": "class",
|
|
3409
3422
|
"locationInModule": {
|
|
3410
3423
|
"filename": "lib/layer.ts",
|
|
3411
|
-
"line":
|
|
3424
|
+
"line": 42
|
|
3412
3425
|
},
|
|
3413
3426
|
"name": "PythonLayerVersion",
|
|
3414
3427
|
"symbolId": "lib/layer:PythonLayerVersion"
|
|
@@ -3431,7 +3444,7 @@
|
|
|
3431
3444
|
"kind": "interface",
|
|
3432
3445
|
"locationInModule": {
|
|
3433
3446
|
"filename": "lib/layer.ts",
|
|
3434
|
-
"line":
|
|
3447
|
+
"line": 11
|
|
3435
3448
|
},
|
|
3436
3449
|
"name": "PythonLayerVersionProps",
|
|
3437
3450
|
"properties": [
|
|
@@ -3444,7 +3457,7 @@
|
|
|
3444
3457
|
"immutable": true,
|
|
3445
3458
|
"locationInModule": {
|
|
3446
3459
|
"filename": "lib/layer.ts",
|
|
3447
|
-
"line":
|
|
3460
|
+
"line": 15
|
|
3448
3461
|
},
|
|
3449
3462
|
"name": "entry",
|
|
3450
3463
|
"type": {
|
|
@@ -3462,7 +3475,7 @@
|
|
|
3462
3475
|
"immutable": true,
|
|
3463
3476
|
"locationInModule": {
|
|
3464
3477
|
"filename": "lib/layer.ts",
|
|
3465
|
-
"line":
|
|
3478
|
+
"line": 35
|
|
3466
3479
|
},
|
|
3467
3480
|
"name": "bundling",
|
|
3468
3481
|
"optional": true,
|
|
@@ -3480,7 +3493,7 @@
|
|
|
3480
3493
|
"immutable": true,
|
|
3481
3494
|
"locationInModule": {
|
|
3482
3495
|
"filename": "lib/layer.ts",
|
|
3483
|
-
"line":
|
|
3496
|
+
"line": 28
|
|
3484
3497
|
},
|
|
3485
3498
|
"name": "compatibleArchitectures",
|
|
3486
3499
|
"optional": true,
|
|
@@ -3503,7 +3516,7 @@
|
|
|
3503
3516
|
"immutable": true,
|
|
3504
3517
|
"locationInModule": {
|
|
3505
3518
|
"filename": "lib/layer.ts",
|
|
3506
|
-
"line":
|
|
3519
|
+
"line": 22
|
|
3507
3520
|
},
|
|
3508
3521
|
"name": "compatibleRuntimes",
|
|
3509
3522
|
"optional": true,
|
|
@@ -3520,6 +3533,6 @@
|
|
|
3520
3533
|
"symbolId": "lib/layer:PythonLayerVersionProps"
|
|
3521
3534
|
}
|
|
3522
3535
|
},
|
|
3523
|
-
"version": "2.
|
|
3536
|
+
"version": "2.28.0-alpha.0",
|
|
3524
3537
|
"fingerprint": "**********"
|
|
3525
3538
|
}
|
package/.jsii.tabl.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2",
|
|
3
|
-
"toolVersion": "1.
|
|
3
|
+
"toolVersion": "1.60.1",
|
|
4
4
|
"snippets": {
|
|
5
5
|
"5044db3aa2cbd19f8d92b0e4571533d0c3964a4debb73355fc0b1849f831db50": {
|
|
6
6
|
"translations": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
41
41
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
42
42
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
43
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
43
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
44
|
+
"constructs.Construct"
|
|
44
45
|
],
|
|
45
46
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n runtime: Runtime.PYTHON_3_8, // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
46
47
|
"syntaxKindCounter": {
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"226": 1,
|
|
54
55
|
"281": 4
|
|
55
56
|
},
|
|
56
|
-
"fqnsFingerprint": "
|
|
57
|
+
"fqnsFingerprint": "f56654edee26ee5ffd59dfc0e1ba77b0a6bf3c57328210de66bee9b0f752ee58"
|
|
57
58
|
},
|
|
58
59
|
"53686c43ad7160036474e74010ea12f31c3ff817524e232264f2795823254c1a": {
|
|
59
60
|
"translations": {
|
|
@@ -91,7 +92,8 @@
|
|
|
91
92
|
"didCompile": true,
|
|
92
93
|
"fqnsReferenced": [
|
|
93
94
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
94
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
95
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps",
|
|
96
|
+
"constructs.Construct"
|
|
95
97
|
],
|
|
96
98
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
97
99
|
"syntaxKindCounter": {
|
|
@@ -104,7 +106,7 @@
|
|
|
104
106
|
"226": 1,
|
|
105
107
|
"281": 1
|
|
106
108
|
},
|
|
107
|
-
"fqnsFingerprint": "
|
|
109
|
+
"fqnsFingerprint": "a7b524b55989fa5a88c8e5324fb7229862e420f642571a5f5020aaffb52a6cc7"
|
|
108
110
|
},
|
|
109
111
|
"5607c1746237addcc7a2cfa766894235cce9b700cdd5ea97a7e88222560655b7": {
|
|
110
112
|
"translations": {
|
|
@@ -146,7 +148,8 @@
|
|
|
146
148
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
147
149
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps",
|
|
148
150
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
149
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
151
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
152
|
+
"constructs.Construct"
|
|
150
153
|
],
|
|
151
154
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n runtime: Runtime.PYTHON_3_8,\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
152
155
|
"syntaxKindCounter": {
|
|
@@ -160,7 +163,7 @@
|
|
|
160
163
|
"226": 1,
|
|
161
164
|
"281": 4
|
|
162
165
|
},
|
|
163
|
-
"fqnsFingerprint": "
|
|
166
|
+
"fqnsFingerprint": "a0ce0d2f780e2d9a2ed4cda0c0d0757838bb24c5800cbbf737c18aa1a7c8729f"
|
|
164
167
|
},
|
|
165
168
|
"f263241052727b50b49ec356568b7a69019d835dfc04249cef6b843690d6a71c": {
|
|
166
169
|
"translations": {
|
|
@@ -203,7 +206,8 @@
|
|
|
203
206
|
"aws-cdk-lib.DockerImage",
|
|
204
207
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
205
208
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
206
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
209
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
210
|
+
"constructs.Construct"
|
|
207
211
|
],
|
|
208
212
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
209
213
|
"syntaxKindCounter": {
|
|
@@ -221,7 +225,7 @@
|
|
|
221
225
|
"281": 5,
|
|
222
226
|
"282": 1
|
|
223
227
|
},
|
|
224
|
-
"fqnsFingerprint": "
|
|
228
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
225
229
|
},
|
|
226
230
|
"7300f4badf25be82206db2ddea0d127c48665c4ca57e1030819c01fd03375d05": {
|
|
227
231
|
"translations": {
|
|
@@ -264,7 +268,8 @@
|
|
|
264
268
|
"aws-cdk-lib.DockerImage",
|
|
265
269
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
266
270
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
267
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
271
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
272
|
+
"constructs.Construct"
|
|
268
273
|
],
|
|
269
274
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: { image },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
270
275
|
"syntaxKindCounter": {
|
|
@@ -282,7 +287,7 @@
|
|
|
282
287
|
"281": 2,
|
|
283
288
|
"282": 2
|
|
284
289
|
},
|
|
285
|
-
"fqnsFingerprint": "
|
|
290
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
286
291
|
},
|
|
287
292
|
"14e4ba79828d038e590c7e524c824df007cc37e22d21a9867a3f714df7531431": {
|
|
288
293
|
"translations": {
|
|
@@ -325,7 +330,8 @@
|
|
|
325
330
|
"aws-cdk-lib.DockerImage",
|
|
326
331
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
327
332
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
328
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
333
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
334
|
+
"constructs.Construct"
|
|
329
335
|
],
|
|
330
336
|
"fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { execSync } from 'child_process';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nconst domain = 'my-domain';\nconst domainOwner = '111122223333';\nconst repoName = 'my_repo';\nconst region = 'us-east-1';\nconst codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim();\n\nconst indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`;\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n environment: { PIP_INDEX_URL: indexUrl },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
331
337
|
"syntaxKindCounter": {
|
|
@@ -353,7 +359,7 @@
|
|
|
353
359
|
"282": 1,
|
|
354
360
|
"290": 1
|
|
355
361
|
},
|
|
356
|
-
"fqnsFingerprint": "
|
|
362
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
357
363
|
},
|
|
358
364
|
"3b28361dfadd6daca165162a42c06bce31bc977911dc6cb37fd4212bf3c53fba": {
|
|
359
365
|
"translations": {
|
|
@@ -396,7 +402,8 @@
|
|
|
396
402
|
"aws-cdk-lib.DockerImage",
|
|
397
403
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
398
404
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
399
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
405
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
406
|
+
"constructs.Construct"
|
|
400
407
|
],
|
|
401
408
|
"fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { execSync } from 'child_process';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nconst domain = 'my-domain';\nconst domainOwner = '111122223333';\nconst repoName = 'my_repo';\nconst region = 'us-east-1';\nconst codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim();\n\nconst indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`;\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
402
409
|
"syntaxKindCounter": {
|
|
@@ -424,7 +431,7 @@
|
|
|
424
431
|
"282": 1,
|
|
425
432
|
"290": 1
|
|
426
433
|
},
|
|
427
|
-
"fqnsFingerprint": "
|
|
434
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
428
435
|
},
|
|
429
436
|
"8c6e45181f0dbc7b76c7757eb559a6a2e14089f3c0d142067ef510dac8445b89": {
|
|
430
437
|
"translations": {
|
|
@@ -466,7 +473,8 @@
|
|
|
466
473
|
"aws-cdk-lib.DockerImage",
|
|
467
474
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
468
475
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
469
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
476
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
477
|
+
"constructs.Construct"
|
|
470
478
|
],
|
|
471
479
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
472
480
|
"syntaxKindCounter": {
|
|
@@ -484,7 +492,7 @@
|
|
|
484
492
|
"281": 5,
|
|
485
493
|
"282": 1
|
|
486
494
|
},
|
|
487
|
-
"fqnsFingerprint": "
|
|
495
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
488
496
|
},
|
|
489
497
|
"1fe68738b650f042a6ca8c4370a73d0a12f94c263535d18a6fcf558138da45b9": {
|
|
490
498
|
"translations": {
|
|
@@ -526,7 +534,8 @@
|
|
|
526
534
|
"aws-cdk-lib.DockerImage",
|
|
527
535
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
528
536
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
529
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
537
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
538
|
+
"constructs.Construct"
|
|
530
539
|
],
|
|
531
540
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
532
541
|
"syntaxKindCounter": {
|
|
@@ -544,7 +553,7 @@
|
|
|
544
553
|
"281": 5,
|
|
545
554
|
"282": 1
|
|
546
555
|
},
|
|
547
|
-
"fqnsFingerprint": "
|
|
556
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
548
557
|
},
|
|
549
558
|
"1487ff584727a1589c5476ca3c4df23801dbe200acd7d18d1bda015d3ea3244c": {
|
|
550
559
|
"translations": {
|
|
@@ -586,7 +595,8 @@
|
|
|
586
595
|
"aws-cdk-lib.DockerImage",
|
|
587
596
|
"aws-cdk-lib.DockerImage#fromBuild",
|
|
588
597
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
589
|
-
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
598
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8",
|
|
599
|
+
"constructs.Construct"
|
|
590
600
|
],
|
|
591
601
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
592
602
|
"syntaxKindCounter": {
|
|
@@ -604,7 +614,7 @@
|
|
|
604
614
|
"281": 5,
|
|
605
615
|
"282": 1
|
|
606
616
|
},
|
|
607
|
-
"fqnsFingerprint": "
|
|
617
|
+
"fqnsFingerprint": "dc34c79d5c3d1c6410cc42651beb37d3ee1d962e7f75f2874b6c5bf4886366bc"
|
|
608
618
|
},
|
|
609
619
|
"2577bd631c6ca99528df5a0dcc24cc3934fd1629688eaf608a382ff7bc1b6a0f": {
|
|
610
620
|
"translations": {
|
|
@@ -641,7 +651,8 @@
|
|
|
641
651
|
"didCompile": true,
|
|
642
652
|
"fqnsReferenced": [
|
|
643
653
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
644
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
654
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps",
|
|
655
|
+
"constructs.Construct"
|
|
645
656
|
],
|
|
646
657
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
647
658
|
"syntaxKindCounter": {
|
|
@@ -654,7 +665,7 @@
|
|
|
654
665
|
"226": 1,
|
|
655
666
|
"281": 1
|
|
656
667
|
},
|
|
657
|
-
"fqnsFingerprint": "
|
|
668
|
+
"fqnsFingerprint": "a7b524b55989fa5a88c8e5324fb7229862e420f642571a5f5020aaffb52a6cc7"
|
|
658
669
|
},
|
|
659
670
|
"e3289a04dc8d758a99b631eb6f19978e241b633977bdc01f803ce3b8bf56da73": {
|
|
660
671
|
"translations": {
|
|
@@ -691,7 +702,8 @@
|
|
|
691
702
|
"didCompile": true,
|
|
692
703
|
"fqnsReferenced": [
|
|
693
704
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
694
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
705
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps",
|
|
706
|
+
"constructs.Construct"
|
|
695
707
|
],
|
|
696
708
|
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
697
709
|
"syntaxKindCounter": {
|
|
@@ -704,7 +716,7 @@
|
|
|
704
716
|
"226": 1,
|
|
705
717
|
"281": 1
|
|
706
718
|
},
|
|
707
|
-
"fqnsFingerprint": "
|
|
719
|
+
"fqnsFingerprint": "a7b524b55989fa5a88c8e5324fb7229862e420f642571a5f5020aaffb52a6cc7"
|
|
708
720
|
}
|
|
709
721
|
}
|
|
710
722
|
}
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ new lambda.PythonFunction(this, 'MyFunction', {
|
|
|
33
33
|
});
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/
|
|
36
|
+
All other properties of `lambda.Function` are supported, see also the [AWS Lambda construct library](https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/aws-lambda).
|
|
37
37
|
|
|
38
38
|
## Python Layer
|
|
39
39
|
|
package/lib/bundling.js
CHANGED
|
@@ -25,7 +25,7 @@ class Bundling {
|
|
|
25
25
|
inputDir: aws_cdk_lib_1.AssetStaging.BUNDLING_INPUT_DIR,
|
|
26
26
|
outputDir: outputPath,
|
|
27
27
|
});
|
|
28
|
-
this.image = image
|
|
28
|
+
this.image = image ?? aws_cdk_lib_1.DockerImage.fromBuild(path.join(__dirname, '../lib'), {
|
|
29
29
|
buildArgs: {
|
|
30
30
|
...props.buildArgs,
|
|
31
31
|
IMAGE: runtime.bundlingImage.image,
|
|
@@ -44,10 +44,9 @@ class Bundling {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
createBundlingCommand(options) {
|
|
47
|
-
var _a;
|
|
48
47
|
const packaging = packaging_1.Packaging.fromEntry(options.entry);
|
|
49
48
|
let bundlingCommands = [];
|
|
50
|
-
bundlingCommands.push(
|
|
49
|
+
bundlingCommands.push(packaging.exportCommand ?? '');
|
|
51
50
|
if (packaging.dependenciesFile) {
|
|
52
51
|
bundlingCommands.push(`python -m pip install -r ${packaging_1.DependenciesFile.PIP} -t ${options.outputDir}`);
|
|
53
52
|
}
|
|
@@ -62,4 +61,4 @@ exports.Bundling = Bundling;
|
|
|
62
61
|
function chain(commands) {
|
|
63
62
|
return commands.filter(c => !!c).join(' && ');
|
|
64
63
|
}
|
|
65
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJidW5kbGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBNkI7QUFDN0IsdURBQWdGO0FBQ2hGLDZDQUErRjtBQUMvRiwyQ0FBMEQ7QUFHMUQ7O0dBRUc7QUFDVSxRQUFBLG1CQUFtQixHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0M7O0dBRUc7QUFDVSxRQUFBLDBCQUEwQixHQUFHLG1CQUFtQixDQUFDO0FBK0I5RDs7R0FFRztBQUNILE1BQWEsUUFBUTtJQWNuQix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KCcgJiYgJyk7XG59XG4iXX0=
|
package/lib/function.d.ts
CHANGED
package/lib/function.js
CHANGED
|
@@ -19,7 +19,7 @@ class PythonFunction extends aws_lambda_1.Function {
|
|
|
19
19
|
}
|
|
20
20
|
catch (error) {
|
|
21
21
|
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
|
22
|
-
Error.captureStackTrace(error,
|
|
22
|
+
Error.captureStackTrace(error, PythonFunction);
|
|
23
23
|
}
|
|
24
24
|
throw error;
|
|
25
25
|
}
|
|
@@ -52,5 +52,5 @@ class PythonFunction extends aws_lambda_1.Function {
|
|
|
52
52
|
}
|
|
53
53
|
exports.PythonFunction = PythonFunction;
|
|
54
54
|
_a = JSII_RTTI_SYMBOL_1;
|
|
55
|
-
PythonFunction[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonFunction", version: "2.
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
PythonFunction[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonFunction", version: "2.28.0-alpha.0" };
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmdW5jdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSx5QkFBeUI7QUFDekIsNkJBQTZCO0FBQzdCLHVEQUEyRjtBQUMzRiw2Q0FBb0M7QUFFcEMseUNBQXNDO0FBNEN0Qzs7R0FFRztBQUNILE1BQWEsY0FBZSxTQUFRLHFCQUFRO0lBQzFDLFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsS0FBMEI7Ozs7OzsrQ0FEekQsY0FBYzs7OztRQUV2QixNQUFNLEVBQUUsS0FBSyxHQUFHLFVBQVUsRUFBRSxPQUFPLEdBQUcsU0FBUyxFQUFFLE9BQU8sRUFBRSxHQUFHLEtBQU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GxlKHtcbiAgICAgICAgZW50cnksXG4gICAgICAgIHJ1bnRpbWUsXG4gICAgICAgIHNraXA6ICFTdGFjay5vZihzY29wZSkuYnVuZGxpbmdSZXF1aXJlZCxcbiAgICAgICAgLi4ucHJvcHMuYnVuZGxpbmcsXG4gICAgICB9KSxcbiAgICAgIGhhbmRsZXI6IHJlc29sdmVkSGFuZGxlcixcbiAgICB9KTtcbiAgfVxufVxuIl19
|
package/lib/layer.d.ts
CHANGED
package/lib/layer.js
CHANGED
|
@@ -14,18 +14,17 @@ const bundling_1 = require("./bundling");
|
|
|
14
14
|
*/
|
|
15
15
|
class PythonLayerVersion extends lambda.LayerVersion {
|
|
16
16
|
constructor(scope, id, props) {
|
|
17
|
-
var _b, _c;
|
|
18
17
|
try {
|
|
19
18
|
jsiiDeprecationWarnings._aws_cdk_aws_lambda_python_alpha_PythonLayerVersionProps(props);
|
|
20
19
|
}
|
|
21
20
|
catch (error) {
|
|
22
21
|
if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
|
23
|
-
Error.captureStackTrace(error,
|
|
22
|
+
Error.captureStackTrace(error, PythonLayerVersion);
|
|
24
23
|
}
|
|
25
24
|
throw error;
|
|
26
25
|
}
|
|
27
|
-
const compatibleRuntimes =
|
|
28
|
-
const compatibleArchitectures =
|
|
26
|
+
const compatibleRuntimes = props.compatibleRuntimes ?? [lambda.Runtime.PYTHON_3_7];
|
|
27
|
+
const compatibleArchitectures = props.compatibleArchitectures ?? [lambda.Architecture.X86_64];
|
|
29
28
|
// Ensure that all compatible runtimes are python
|
|
30
29
|
for (const runtime of compatibleRuntimes) {
|
|
31
30
|
if (runtime && runtime.family !== lambda.RuntimeFamily.PYTHON) {
|
|
@@ -53,5 +52,5 @@ class PythonLayerVersion extends lambda.LayerVersion {
|
|
|
53
52
|
}
|
|
54
53
|
exports.PythonLayerVersion = PythonLayerVersion;
|
|
55
54
|
_a = JSII_RTTI_SYMBOL_1;
|
|
56
|
-
PythonLayerVersion[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion", version: "2.
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
PythonLayerVersion[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion", version: "2.28.0-alpha.0" };
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJsYXllci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSw2QkFBNkI7QUFDN0IsaURBQWlEO0FBQ2pELDZDQUFvQztBQUVwQyx5Q0FBc0M7QUFpQ3RDOzs7R0FHRztBQUNILE1BQWEsa0JBQW1CLFNBQVEsTUFBTSxDQUFDLFlBQVk7SUFDekQsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxLQUE4Qjs7Ozs7OytDQUQ3RCxrQkFBa0I7Ozs7UUFFM0IsTUFBTSxrQkFBa0IsR0FBRyxLQUFLLENBQUMsa0JBQWtCLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQ25GLE1BQU0sdUJBQXVCLEdBQUcsS0FBSyxDQUFDLHVCQUF1QixJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUU5RixpREFBaUQ7UUFDakQsS0FBSyxNQUFNLE9BQU8sSUFBSSxrQkFBa0IsRUFBRTtZQUN4QyxJQUFJLE9BQU8sSUFBSSxPQUFPLENBQUMsTUFBTSxLQUFLLE1BQU0sQ0FBQyxhQUFhLENBQUMsTUFBTSxFQUFFO2dCQUM3RCxNQUFNLElBQUksS0FBSyxDQUFDLHVDQUF1QyxDQUFDLENBQUM7YUFDMUQ7U0FDRjtRQUVELHFCQUFxQjtRQUNyQixNQUFNLEtBQUssR0FBRyxJQUFJLEN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29uc3QgcnVudGltZSA9IGNvbXBhdGlibGVSdW50aW1lc1swXTtcbiAgICBjb25zdCBhcmNoaXRlY3R1cmUgPSBjb21wYXRpYmxlQXJjaGl0ZWN0dXJlc1swXTtcblxuICAgIHN1cGVyKHNjb3BlLCBpZCwge1xuICAgICAgLi4ucHJvcHMsXG4gICAgICBjb21wYXRpYmxlUnVudGltZXMsXG4gICAgICBjb2RlOiBCdW5kbGluZy5idW5kbGUoe1xuICAgICAgICBlbnRyeSxcbiAgICAgICAgcnVudGltZSxcbiAgICAgICAgYXJjaGl0ZWN0dXJlLFxuICAgICAgICBvdXRwdXRQYXRoU3VmZml4OiAncHl0aG9uJyxcbiAgICAgICAgc2tpcDogIVN0YWNrLm9mKHNjb3BlKS5idW5kbGluZ1JlcXVpcmVkLFxuICAgICAgICAuLi5wcm9wcy5idW5kbGluZyxcbiAgICAgIH0pLFxuICAgIH0pO1xuICB9XG59XG4iXX0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-cdk/aws-lambda-python-alpha",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0-alpha.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The CDK Construct Library for AWS Lambda in Python",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dotnet": {
|
|
19
19
|
"namespace": "Amazon.CDK.AWS.Lambda.Python.Alpha",
|
|
20
20
|
"packageId": "Amazon.CDK.AWS.Lambda.Python.Alpha",
|
|
21
|
-
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/
|
|
21
|
+
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png"
|
|
22
22
|
},
|
|
23
23
|
"python": {
|
|
24
24
|
"distName": "aws-cdk.aws-lambda-python-alpha",
|
|
@@ -76,17 +76,17 @@
|
|
|
76
76
|
},
|
|
77
77
|
"license": "Apache-2.0",
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@aws-cdk/cdk-build-tools": "2.
|
|
80
|
-
"@aws-cdk/integ-runner": "2.
|
|
81
|
-
"@aws-cdk/pkglint": "2.
|
|
82
|
-
"@types/jest": "^27.5.
|
|
83
|
-
"aws-cdk-lib": "2.
|
|
79
|
+
"@aws-cdk/cdk-build-tools": "2.28.0",
|
|
80
|
+
"@aws-cdk/integ-runner": "2.28.0",
|
|
81
|
+
"@aws-cdk/pkglint": "2.28.0",
|
|
82
|
+
"@types/jest": "^27.5.2",
|
|
83
|
+
"aws-cdk-lib": "2.28.0",
|
|
84
84
|
"constructs": "^10.0.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {},
|
|
87
87
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"aws-cdk-lib": "^2.
|
|
89
|
+
"aws-cdk-lib": "^2.28.0",
|
|
90
90
|
"constructs": "^10.0.0"
|
|
91
91
|
},
|
|
92
92
|
"engines": {
|