@aws-cdk/aws-lambda-python-alpha 2.55.1-alpha.0 → 2.56.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 +25 -32
- package/.jsii.tabl.json.gz +0 -0
- package/.warnings.jsii.js +4 -0
- package/README.md +18 -0
- package/lib/bundling.d.ts +8 -1
- package/lib/bundling.js +9 -2
- package/lib/function.js +1 -1
- package/lib/layer.js +1 -1
- package/lib/types.d.ts +2 -10
- package/lib/types.js +1 -1
- package/package.json +7 -7
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.56.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -990,6 +990,19 @@
|
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
},
|
|
993
|
+
"aws-cdk-lib.aws_docdbelastic": {
|
|
994
|
+
"targets": {
|
|
995
|
+
"dotnet": {
|
|
996
|
+
"namespace": "Amazon.CDK.AWS.DocDBElastic"
|
|
997
|
+
},
|
|
998
|
+
"java": {
|
|
999
|
+
"package": "software.amazon.awscdk.services.docdbelastic"
|
|
1000
|
+
},
|
|
1001
|
+
"python": {
|
|
1002
|
+
"module": "aws_cdk.aws_docdbelastic"
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
993
1006
|
"aws-cdk-lib.aws_dynamodb": {
|
|
994
1007
|
"targets": {
|
|
995
1008
|
"dotnet": {
|
|
@@ -3305,7 +3318,7 @@
|
|
|
3305
3318
|
},
|
|
3306
3319
|
"name": "@aws-cdk/aws-lambda-python-alpha",
|
|
3307
3320
|
"readme": {
|
|
3308
|
-
"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 python.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 python.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 python.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n runtime: Runtime.PYTHON_3_8,\n layers: [\n new python.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 python.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 python.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 python.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 python.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});\n```\n\n## Command hooks\n\nIt is possible to run additional commands by specifying the `commandHooks` prop:\n\n```ts\nconst entry = '/path/to/function';\nnew python.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n commandHooks: {\n // run tests\n beforeBundling(inputDir: string): string[] {\n return ['pytest'];\n },\n afterBundling(inputDir: string): string[] {\n return ['pylint'];\n },\n // ...\n },\n },\n});\n```\n\nThe following hooks are available:\n\n- `beforeBundling`: runs before all bundling commands\n- `afterBundling`: runs after all bundling commands\n\nThey all receive the directory containing the dependencies file (`inputDir`) and the\ndirectory where the bundled asset will be output (`outputDir`). They must return\nan array of commands to run. Commands are chained with `&&`.\n\nThe commands will run in the environment in which bundling occurs: inside the\ncontainer for Docker bundling or on the host OS for local bundling.\n"
|
|
3321
|
+
"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 python.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 python.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 python.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n runtime: Runtime.PYTHON_3_8,\n layers: [\n new python.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 python.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 python.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: { image },\n});\n```\n\nYou can set additional Docker options to configure the build environment:\n\n ```ts\nconst entry = '/path/to/function';\n\nnew python.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n network: 'host',\n securityOpt: 'no-new-privileges',\n user: 'user:group',\n volumesFrom: ['777f7dc92da7'],\n volumes: [{ hostPath: '/host-path', containerPath: '/container-path' }],\n },\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 python.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 python.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});\n```\n\n## Command hooks\n\nIt is possible to run additional commands by specifying the `commandHooks` prop:\n\n```ts\nconst entry = '/path/to/function';\nnew python.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n commandHooks: {\n // run tests\n beforeBundling(inputDir: string): string[] {\n return ['pytest'];\n },\n afterBundling(inputDir: string): string[] {\n return ['pylint'];\n },\n // ...\n },\n },\n});\n```\n\nThe following hooks are available:\n\n- `beforeBundling`: runs before all bundling commands\n- `afterBundling`: runs after all bundling commands\n\nThey all receive the directory containing the dependencies file (`inputDir`) and the\ndirectory where the bundled asset will be output (`outputDir`). They must return\nan array of commands to run. Commands are chained with `&&`.\n\nThe commands will run in the environment in which bundling occurs: inside the\ncontainer for Docker bundling or on the host OS for local bundling.\n"
|
|
3309
3322
|
},
|
|
3310
3323
|
"repository": {
|
|
3311
3324
|
"directory": "packages/individual-packages/aws-lambda-python",
|
|
@@ -3355,6 +3368,9 @@
|
|
|
3355
3368
|
}
|
|
3356
3369
|
},
|
|
3357
3370
|
"fqn": "@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
3371
|
+
"interfaces": [
|
|
3372
|
+
"aws-cdk-lib.DockerRunOptions"
|
|
3373
|
+
],
|
|
3358
3374
|
"kind": "interface",
|
|
3359
3375
|
"locationInModule": {
|
|
3360
3376
|
"filename": "lib/types.ts",
|
|
@@ -3373,7 +3389,7 @@
|
|
|
3373
3389
|
"immutable": true,
|
|
3374
3390
|
"locationInModule": {
|
|
3375
3391
|
"filename": "lib/types.ts",
|
|
3376
|
-
"line":
|
|
3392
|
+
"line": 81
|
|
3377
3393
|
},
|
|
3378
3394
|
"name": "assetHash",
|
|
3379
3395
|
"optional": true,
|
|
@@ -3392,7 +3408,7 @@
|
|
|
3392
3408
|
"immutable": true,
|
|
3393
3409
|
"locationInModule": {
|
|
3394
3410
|
"filename": "lib/types.ts",
|
|
3395
|
-
"line":
|
|
3411
|
+
"line": 65
|
|
3396
3412
|
},
|
|
3397
3413
|
"name": "assetHashType",
|
|
3398
3414
|
"optional": true,
|
|
@@ -3434,7 +3450,7 @@
|
|
|
3434
3450
|
"immutable": true,
|
|
3435
3451
|
"locationInModule": {
|
|
3436
3452
|
"filename": "lib/types.ts",
|
|
3437
|
-
"line":
|
|
3453
|
+
"line": 88
|
|
3438
3454
|
},
|
|
3439
3455
|
"name": "commandHooks",
|
|
3440
3456
|
"optional": true,
|
|
@@ -3442,29 +3458,6 @@
|
|
|
3442
3458
|
"fqn": "@aws-cdk/aws-lambda-python-alpha.ICommandHooks"
|
|
3443
3459
|
}
|
|
3444
3460
|
},
|
|
3445
|
-
{
|
|
3446
|
-
"abstract": true,
|
|
3447
|
-
"docs": {
|
|
3448
|
-
"default": "- no environment variables are defined.",
|
|
3449
|
-
"stability": "experimental",
|
|
3450
|
-
"summary": "Environment variables defined when bundling runs."
|
|
3451
|
-
},
|
|
3452
|
-
"immutable": true,
|
|
3453
|
-
"locationInModule": {
|
|
3454
|
-
"filename": "lib/types.ts",
|
|
3455
|
-
"line": 48
|
|
3456
|
-
},
|
|
3457
|
-
"name": "environment",
|
|
3458
|
-
"optional": true,
|
|
3459
|
-
"type": {
|
|
3460
|
-
"collection": {
|
|
3461
|
-
"elementtype": {
|
|
3462
|
-
"primitive": "string"
|
|
3463
|
-
},
|
|
3464
|
-
"kind": "map"
|
|
3465
|
-
}
|
|
3466
|
-
}
|
|
3467
|
-
},
|
|
3468
3461
|
{
|
|
3469
3462
|
"abstract": true,
|
|
3470
3463
|
"docs": {
|
|
@@ -3536,7 +3529,7 @@
|
|
|
3536
3529
|
"kind": "interface",
|
|
3537
3530
|
"locationInModule": {
|
|
3538
3531
|
"filename": "lib/types.ts",
|
|
3539
|
-
"line":
|
|
3532
|
+
"line": 109
|
|
3540
3533
|
},
|
|
3541
3534
|
"methods": [
|
|
3542
3535
|
{
|
|
@@ -3548,7 +3541,7 @@
|
|
|
3548
3541
|
},
|
|
3549
3542
|
"locationInModule": {
|
|
3550
3543
|
"filename": "lib/types.ts",
|
|
3551
|
-
"line":
|
|
3544
|
+
"line": 122
|
|
3552
3545
|
},
|
|
3553
3546
|
"name": "afterBundling",
|
|
3554
3547
|
"parameters": [
|
|
@@ -3585,7 +3578,7 @@
|
|
|
3585
3578
|
},
|
|
3586
3579
|
"locationInModule": {
|
|
3587
3580
|
"filename": "lib/types.ts",
|
|
3588
|
-
"line":
|
|
3581
|
+
"line": 115
|
|
3589
3582
|
},
|
|
3590
3583
|
"name": "beforeBundling",
|
|
3591
3584
|
"parameters": [
|
|
@@ -3936,6 +3929,6 @@
|
|
|
3936
3929
|
"symbolId": "lib/layer:PythonLayerVersionProps"
|
|
3937
3930
|
}
|
|
3938
3931
|
},
|
|
3939
|
-
"version": "2.
|
|
3932
|
+
"version": "2.56.0-alpha.0",
|
|
3940
3933
|
"fingerprint": "**********"
|
|
3941
3934
|
}
|
package/.jsii.tabl.json.gz
CHANGED
|
Binary file
|
package/.warnings.jsii.js
CHANGED
|
@@ -57,6 +57,10 @@ function _aws_cdk_aws_lambda_python_alpha_BundlingOptions(p) {
|
|
|
57
57
|
try {
|
|
58
58
|
if (!visitedObjects.has(p.commandHooks))
|
|
59
59
|
_aws_cdk_aws_lambda_python_alpha_ICommandHooks(p.commandHooks);
|
|
60
|
+
if (p.volumes != null)
|
|
61
|
+
for (const o of p.volumes)
|
|
62
|
+
if (!visitedObjects.has(o))
|
|
63
|
+
require("aws-cdk-lib/.warnings.jsii.js").aws_cdk_lib_DockerVolume(o);
|
|
60
64
|
}
|
|
61
65
|
finally {
|
|
62
66
|
visitedObjects.delete(p);
|
package/README.md
CHANGED
|
@@ -145,6 +145,24 @@ new python.PythonFunction(this, 'function', {
|
|
|
145
145
|
});
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
+
You can set additional Docker options to configure the build environment:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
const entry = '/path/to/function';
|
|
152
|
+
|
|
153
|
+
new python.PythonFunction(this, 'function', {
|
|
154
|
+
entry,
|
|
155
|
+
runtime: Runtime.PYTHON_3_8,
|
|
156
|
+
bundling: {
|
|
157
|
+
network: 'host',
|
|
158
|
+
securityOpt: 'no-new-privileges',
|
|
159
|
+
user: 'user:group',
|
|
160
|
+
volumesFrom: ['777f7dc92da7'],
|
|
161
|
+
volumes: [{ hostPath: '/host-path', containerPath: '/container-path' }],
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
```
|
|
165
|
+
|
|
148
166
|
## Custom Bundling with Code Artifact
|
|
149
167
|
|
|
150
168
|
To use a Code Artifact PyPI repo, the `PIP_INDEX_URL` for bundling the function can be customized (requires AWS CLI in the build environment):
|
package/lib/bundling.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Architecture, AssetCode, Runtime } from 'aws-cdk-lib/aws-lambda';
|
|
2
|
-
import { BundlingOptions as CdkBundlingOptions, DockerImage } from 'aws-cdk-lib';
|
|
2
|
+
import { BundlingOptions as CdkBundlingOptions, DockerImage, DockerVolume } from 'aws-cdk-lib';
|
|
3
3
|
import { BundlingOptions } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Dependency files to exclude from the asset hash.
|
|
@@ -40,10 +40,17 @@ export interface BundlingProps extends BundlingOptions {
|
|
|
40
40
|
export declare class Bundling implements CdkBundlingOptions {
|
|
41
41
|
static bundle(options: BundlingProps): AssetCode;
|
|
42
42
|
readonly image: DockerImage;
|
|
43
|
+
readonly entrypoint?: string[];
|
|
43
44
|
readonly command: string[];
|
|
45
|
+
readonly volumes?: DockerVolume[];
|
|
46
|
+
readonly volumesFrom?: string[];
|
|
44
47
|
readonly environment?: {
|
|
45
48
|
[key: string]: string;
|
|
46
49
|
};
|
|
50
|
+
readonly workingDirectory?: string;
|
|
51
|
+
readonly user?: string;
|
|
52
|
+
readonly securityOpt?: string;
|
|
53
|
+
readonly network?: string;
|
|
47
54
|
constructor(props: BundlingProps);
|
|
48
55
|
private createBundlingCommand;
|
|
49
56
|
}
|
package/lib/bundling.js
CHANGED
|
@@ -34,8 +34,15 @@ class Bundling {
|
|
|
34
34
|
},
|
|
35
35
|
platform: architecture.dockerPlatform,
|
|
36
36
|
});
|
|
37
|
-
this.command = ['bash', '-c', chain(bundlingCommands)];
|
|
37
|
+
this.command = props.command ?? ['bash', '-c', chain(bundlingCommands)];
|
|
38
|
+
this.entrypoint = props.entrypoint;
|
|
39
|
+
this.volumes = props.volumes;
|
|
40
|
+
this.volumesFrom = props.volumesFrom;
|
|
38
41
|
this.environment = props.environment;
|
|
42
|
+
this.workingDirectory = props.workingDirectory;
|
|
43
|
+
this.user = props.user;
|
|
44
|
+
this.securityOpt = props.securityOpt;
|
|
45
|
+
this.network = props.network;
|
|
39
46
|
}
|
|
40
47
|
static bundle(options) {
|
|
41
48
|
return aws_lambda_1.Code.fromAsset(options.entry, {
|
|
@@ -66,4 +73,4 @@ exports.Bundling = Bundling;
|
|
|
66
73
|
function chain(commands) {
|
|
67
74
|
return commands.filter(c => !!c).join(' && ');
|
|
68
75
|
}
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
76
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJidW5kbGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBNkI7QUFDN0IsdURBQWdGO0FBQ2hGLDZDQUE2RztBQUM3RywyQ0FBMEQ7QUFHMUQ7O0dBRUc7QUFDVSxRQUFBLG1CQUFtQixHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7QUFFN0M7O0dBRUc7QUFDVSxRQUFBLDBCQUEwQixHQUFHLG1CQUFtQixDQUFDO0FBK0I5RDs7R0FFRztBQUNILE1BQWEsUUFBUTtJQXFCbkIsWUFBWSxLQUFvQjtRQUM5QixNQUFNLEVBQ0osS0FBSyxFQUNMLE9BQU8sRUFDUCxZQUFZLEdBQUcseUJBQVksQ0FBQyxNQUFNLEVBQ2xDLGdCQUFnQixHQUFHLEVBQUUsRUFDckIsS0FBSyxFQUNMLG1CQUFtQixFQUNuQixZQUFZLEdBQ2IsR0FBRyxLQUFLLENBQUM7UUFFVixNQUFNLFVBQVUsR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RzOiBzdHJpbmdbXSk6IHN0cmluZyB7XG4gIHJldHVybiBjb21tYW5kcy5maWx0ZXIoYyA9PiAhIWMpLmpvaW4oJyAmJiAnKTtcbn1cbiJdfQ==
|
package/lib/function.js
CHANGED
|
@@ -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.
|
|
55
|
+
PythonFunction[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonFunction", version: "2.56.0-alpha.0" };
|
|
56
56
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmdW5jdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSx5QkFBeUI7QUFDekIsNkJBQTZCO0FBQzdCLHVEQUEyRjtBQUMzRiw2Q0FBb0M7QUFFcEMseUNBQXNDO0FBNEN0Qzs7R0FFRztBQUNILE1BQWEsY0FBZSxTQUFRLHFCQUFRO0lBQzFDLFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsS0FBMEI7Ozs7OzsrQ0FEekQsY0FBYzs7OztRQUV2QixNQUFNLEVBQUUsS0FBSyxHQUFHLFVBQVUsRUFBRSxPQUFPLEdBQUcsU0FBUyxFQUFFLE9BQU8sRUFBRSxHQUFHLEtBQUssQ0FBQztRQUNuRSxJQUFJLEtBQUssQ0FBQyxLQUFLLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUM3QyxNQUFNLElBQUksS0FBSyxDQUFDLDhDQUE4QyxDQUFDLENBQUM7U0FDakU7UUFF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lc29sdmVkSGFuZGxlcixcbiAgICB9KTtcbiAgfVxufVxuIl19
|
package/lib/layer.js
CHANGED
|
@@ -52,5 +52,5 @@ class PythonLayerVersion extends lambda.LayerVersion {
|
|
|
52
52
|
}
|
|
53
53
|
exports.PythonLayerVersion = PythonLayerVersion;
|
|
54
54
|
_a = JSII_RTTI_SYMBOL_1;
|
|
55
|
-
PythonLayerVersion[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion", version: "2.
|
|
55
|
+
PythonLayerVersion[_a] = { fqn: "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion", version: "2.56.0-alpha.0" };
|
|
56
56
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJsYXllci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSw2QkFBNkI7QUFDN0IsaURBQWlEO0FBQ2pELDZDQUFvQztBQUVwQyx5Q0FBc0M7QUFpQ3RDOzs7R0FHRztBQUNILE1BQWEsa0JBQW1CLFNBQVEsTUFBTSxDQUFDLFlBQVk7SUFDekQsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxLQUE4Qjs7Ozs7OytDQUQ3RCxrQkFBa0I7Ozs7UUFFM0IsTUFBTSxrQkFBa0IsR0FBRyxLQUFLLENBQUMsa0JBQWtCLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQ25GLE1BQU0sdUJBQXVCLEdBQUcsS0FBSyxDQUFDLHVCQUF1QixJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUU5RixpREFBaUQ7UUFDakQsS0FBSyxNQUFNLE9BQU8sSUFBSSxrQkFBa0IsRUFBRTtZQUN4QyxJQUFJLE9BQU8sSUFBSSxPQUFPLENBQ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gICAgY29uc3QgZW50cnkgPSBwYXRoLnJlc29sdmUocHJvcHMuZW50cnkpO1xuICAgIC8vIFBpY2sgdGhlIGZpcnN0IGNvbXBhdGlibGVSdW50aW1lIGFuZCBjb21wYXRpYmxlQXJjaGl0ZWN0dXJlcyB0byB1c2UgZm9yIGJ1bmRsaW5nXG4gICAgY29uc3QgcnVudGltZSA9IGNvbXBhdGlibGVSdW50aW1lc1swXTtcbiAgICBjb25zdCBhcmNoaXRlY3R1cmUgPSBjb21wYXRpYmxlQXJjaGl0ZWN0dXJlc1swXTtcblxuICAgIHN1cGVyKHNjb3BlLCBpZCwge1xuICAgICAgLi4ucHJvcHMsXG4gICAgICBjb21wYXRpYmxlUnVudGltZXMsXG4gICAgICBjb2RlOiBCdW5kbGluZy5idW5kbGUoe1xuICAgICAgICBlbnRyeSxcbiAgICAgICAgcnVudGltZSxcbiAgICAgICAgYXJjaGl0ZWN0dXJlLFxuICAgICAgICBvdXRwdXRQYXRoU3VmZml4OiAncHl0aG9uJyxcbiAgICAgICAgc2tpcDogIVN0YWNrLm9mKHNjb3BlKS5idW5kbGluZ1JlcXVpcmVkLFxuICAgICAgICAuLi5wcm9wcy5idW5kbGluZyxcbiAgICAgIH0pLFxuICAgIH0pO1xuICB9XG59XG4iXX0=
|
package/lib/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AssetHashType, DockerImage } from 'aws-cdk-lib';
|
|
1
|
+
import { AssetHashType, DockerImage, DockerRunOptions } from 'aws-cdk-lib';
|
|
2
2
|
/**
|
|
3
3
|
* Options for bundling
|
|
4
4
|
*/
|
|
5
|
-
export interface BundlingOptions {
|
|
5
|
+
export interface BundlingOptions extends DockerRunOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Whether to export Poetry dependencies with hashes. Note that this can cause builds to fail if not all dependencies
|
|
8
8
|
* export with a hash.
|
|
@@ -35,14 +35,6 @@ export interface BundlingOptions {
|
|
|
35
35
|
readonly buildArgs?: {
|
|
36
36
|
[key: string]: string;
|
|
37
37
|
};
|
|
38
|
-
/**
|
|
39
|
-
* Environment variables defined when bundling runs.
|
|
40
|
-
*
|
|
41
|
-
* @default - no environment variables are defined.
|
|
42
|
-
*/
|
|
43
|
-
readonly environment?: {
|
|
44
|
-
[key: string]: string;
|
|
45
|
-
};
|
|
46
38
|
/**
|
|
47
39
|
* Determines how asset hash is calculated. Assets will get rebuild and
|
|
48
40
|
* uploaded only if their hash has changed.
|
package/lib/types.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQXNzZXRIYXNoVHlwZSwgRG9ja2VySW1hZ2UsIERvY2tlclJ1bk9wdGlvbnMgfSBmcm9tICdhd3MtY2RrLWxpYic7XG5cblxuLyoqXG4gKiBPcHRpb25zIGZvciBidW5kbGluZ1xuICovXG5leHBvcnQgaW50ZXJmYWNlIEJ1bmRsaW5nT3B0aW9ucyBleHRlbmRzIERvY2tlclJ1bk9wdGlvbnMge1xuXG4gIC8qKlxuICAgKiBXaGV0aGVyIHRvIGV4cG9ydCBQb2V0cnkgZGVwZW5kZW5jaWVzIHdpdGggaGFzaGVzLiBOb3RlIHRoYXQgdGhpcyBjYW4gY2F1c2UgYnVpbGRzIHRvIGZhaWwgaWYgbm90IGFsbCBkZXBlbmRlbmNpZXNcbiAgICogZXhwb3J0IHdpdGggYSBoYXNoLlxuICAgKlxuICAgKiBAc2VlIGh0dHBzOi8vZ2l0aHViLmNvbS9hd3MvYXdzLWNkay9pc3N1ZXMv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HRoZSBjb250YWluZXIgZm9yIERvY2tlciBidW5kbGluZyBvciBvbiB0aGUgaG9zdCBPUyBmb3IgbG9jYWwgYnVuZGxpbmcuXG4gKlxuICogQ29tbWFuZHMgYXJlIGNoYWluZWQgd2l0aCBgJiZgLlxuICpcbiAqIGBgYHRleHRcbiAqIHtcbiAqICAgLy8gUnVuIHRlc3RzIHByaW9yIHRvIGJ1bmRsaW5nXG4gKiAgIGJlZm9yZUJ1bmRsaW5nKGlucHV0RGlyOiBzdHJpbmcsIG91dHB1dERpcjogc3RyaW5nKTogc3RyaW5nW10ge1xuICogICAgIHJldHVybiBbYHB5dGVzdGBdO1xuICogICB9XG4gKiAgIC8vIC4uLlxuICogfVxuICogYGBgXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgSUNvbW1hbmRIb29rcyB7XG4gIC8qKlxuICAgKiBSZXR1cm5zIGNvbW1hbmRzIHRvIHJ1biBiZWZvcmUgYnVuZGxpbmcuXG4gICAqXG4gICAqIENvbW1hbmRzIGFyZSBjaGFpbmVkIHdpdGggYCYmYC5cbiAgICovXG4gIGJlZm9yZUJ1bmRsaW5nKGlucHV0RGlyOiBzdHJpbmcsIG91dHB1dERpcjogc3RyaW5nKTogc3RyaW5nW107XG5cbiAgLyoqXG4gICAqIFJldHVybnMgY29tbWFuZHMgdG8gcnVuIGFmdGVyIGJ1bmRsaW5nLlxuICAgKlxuICAgKiBDb21tYW5kcyBhcmUgY2hhaW5lZCB3aXRoIGAmJmAuXG4gICAqL1xuICBhZnRlckJ1bmRsaW5nKGlucHV0RGlyOiBzdHJpbmcsIG91dHB1dERpcjogc3RyaW5nKTogc3RyaW5nW107XG59XG4iXX0=
|
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.56.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",
|
|
@@ -76,18 +76,18 @@
|
|
|
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.
|
|
79
|
+
"@aws-cdk/cdk-build-tools": "2.56.0",
|
|
80
|
+
"@aws-cdk/integ-runner": "2.56.0",
|
|
81
|
+
"@aws-cdk/pkglint": "2.56.0",
|
|
82
82
|
"@types/jest": "^27.5.2",
|
|
83
|
-
"aws-cdk-lib": "2.
|
|
83
|
+
"aws-cdk-lib": "2.56.0",
|
|
84
84
|
"constructs": "^10.0.0",
|
|
85
|
-
"@aws-cdk/integ-tests-alpha": "2.
|
|
85
|
+
"@aws-cdk/integ-tests-alpha": "2.56.0-alpha.0"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {},
|
|
88
88
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"aws-cdk-lib": "^2.
|
|
90
|
+
"aws-cdk-lib": "^2.56.0",
|
|
91
91
|
"constructs": "^10.0.0"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|