@aws-cdk/aws-lambda-python-alpha 2.1.0-alpha.0 → 2.5.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 +262 -52
- package/.jsii.tabl.json +595 -0
- package/.warnings.jsii.js +17 -11
- package/LICENSE +1 -1
- package/NOTICE +1 -1
- package/README.md +103 -23
- package/lib/Dockerfile +7 -2
- package/lib/bundling.d.ts +15 -53
- package/lib/bundling.js +47 -60
- package/lib/function.d.ts +20 -50
- package/lib/function.js +14 -20
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/layer.d.ts +12 -1
- package/lib/layer.js +4 -3
- package/lib/packaging.d.ts +40 -0
- package/lib/packaging.js +61 -0
- package/lib/types.d.ts +79 -0
- package/lib/types.js +3 -0
- package/package.json +6 -6
- package/rosetta/default.ts-fixture +1 -1
- package/lib/Dockerfile.dependencies +0 -22
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.5.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -105,6 +105,19 @@
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
+
"aws-cdk-lib.aws_amplifyuibuilder": {
|
|
109
|
+
"targets": {
|
|
110
|
+
"dotnet": {
|
|
111
|
+
"namespace": "Amazon.CDK.AWS.AmplifyUIBuilder"
|
|
112
|
+
},
|
|
113
|
+
"java": {
|
|
114
|
+
"package": "software.amazon.awscdk.services.amplifyuibuilder"
|
|
115
|
+
},
|
|
116
|
+
"python": {
|
|
117
|
+
"module": "aws_cdk.aws_amplifyuibuilder"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
108
121
|
"aws-cdk-lib.aws_apigateway": {
|
|
109
122
|
"targets": {
|
|
110
123
|
"dotnet": {
|
|
@@ -1120,6 +1133,19 @@
|
|
|
1120
1133
|
}
|
|
1121
1134
|
}
|
|
1122
1135
|
},
|
|
1136
|
+
"aws-cdk-lib.aws_evidently": {
|
|
1137
|
+
"targets": {
|
|
1138
|
+
"dotnet": {
|
|
1139
|
+
"namespace": "Amazon.CDK.AWS.Evidently"
|
|
1140
|
+
},
|
|
1141
|
+
"java": {
|
|
1142
|
+
"package": "software.amazon.awscdk.services.evidently"
|
|
1143
|
+
},
|
|
1144
|
+
"python": {
|
|
1145
|
+
"module": "aws_cdk.aws_evidently"
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1123
1149
|
"aws-cdk-lib.aws_finspace": {
|
|
1124
1150
|
"targets": {
|
|
1125
1151
|
"dotnet": {
|
|
@@ -1601,6 +1627,19 @@
|
|
|
1601
1627
|
}
|
|
1602
1628
|
}
|
|
1603
1629
|
},
|
|
1630
|
+
"aws-cdk-lib.aws_lex": {
|
|
1631
|
+
"targets": {
|
|
1632
|
+
"dotnet": {
|
|
1633
|
+
"namespace": "Amazon.CDK.AWS.Lex"
|
|
1634
|
+
},
|
|
1635
|
+
"java": {
|
|
1636
|
+
"package": "software.amazon.awscdk.services.lex"
|
|
1637
|
+
},
|
|
1638
|
+
"python": {
|
|
1639
|
+
"module": "aws_cdk.aws_lex"
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1604
1643
|
"aws-cdk-lib.aws_licensemanager": {
|
|
1605
1644
|
"targets": {
|
|
1606
1645
|
"dotnet": {
|
|
@@ -2030,6 +2069,19 @@
|
|
|
2030
2069
|
}
|
|
2031
2070
|
}
|
|
2032
2071
|
},
|
|
2072
|
+
"aws-cdk-lib.aws_refactorspaces": {
|
|
2073
|
+
"targets": {
|
|
2074
|
+
"dotnet": {
|
|
2075
|
+
"namespace": "Amazon.CDK.AWS.RefactorSpaces"
|
|
2076
|
+
},
|
|
2077
|
+
"java": {
|
|
2078
|
+
"package": "software.amazon.awscdk.services.refactorspaces"
|
|
2079
|
+
},
|
|
2080
|
+
"python": {
|
|
2081
|
+
"module": "aws_cdk.aws_refactorspaces"
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
},
|
|
2033
2085
|
"aws-cdk-lib.aws_rekognition": {
|
|
2034
2086
|
"targets": {
|
|
2035
2087
|
"dotnet": {
|
|
@@ -2043,6 +2095,19 @@
|
|
|
2043
2095
|
}
|
|
2044
2096
|
}
|
|
2045
2097
|
},
|
|
2098
|
+
"aws-cdk-lib.aws_resiliencehub": {
|
|
2099
|
+
"targets": {
|
|
2100
|
+
"dotnet": {
|
|
2101
|
+
"namespace": "Amazon.CDK.AWS.ResilienceHub"
|
|
2102
|
+
},
|
|
2103
|
+
"java": {
|
|
2104
|
+
"package": "software.amazon.awscdk.services.resiliencehub"
|
|
2105
|
+
},
|
|
2106
|
+
"python": {
|
|
2107
|
+
"module": "aws_cdk.aws_resiliencehub"
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
},
|
|
2046
2111
|
"aws-cdk-lib.aws_resourcegroups": {
|
|
2047
2112
|
"targets": {
|
|
2048
2113
|
"dotnet": {
|
|
@@ -2147,6 +2212,19 @@
|
|
|
2147
2212
|
}
|
|
2148
2213
|
}
|
|
2149
2214
|
},
|
|
2215
|
+
"aws-cdk-lib.aws_rum": {
|
|
2216
|
+
"targets": {
|
|
2217
|
+
"dotnet": {
|
|
2218
|
+
"namespace": "Amazon.CDK.AWS.RUM"
|
|
2219
|
+
},
|
|
2220
|
+
"java": {
|
|
2221
|
+
"package": "software.amazon.awscdk.services.rum"
|
|
2222
|
+
},
|
|
2223
|
+
"python": {
|
|
2224
|
+
"module": "aws_cdk.aws_rum"
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
},
|
|
2150
2228
|
"aws-cdk-lib.aws_s3": {
|
|
2151
2229
|
"targets": {
|
|
2152
2230
|
"dotnet": {
|
|
@@ -2777,7 +2855,7 @@
|
|
|
2777
2855
|
"stability": "experimental"
|
|
2778
2856
|
},
|
|
2779
2857
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
2780
|
-
"jsiiVersion": "1.
|
|
2858
|
+
"jsiiVersion": "1.50.0 (build d1830a4)",
|
|
2781
2859
|
"keywords": [
|
|
2782
2860
|
"aws",
|
|
2783
2861
|
"cdk",
|
|
@@ -2798,7 +2876,7 @@
|
|
|
2798
2876
|
},
|
|
2799
2877
|
"name": "@aws-cdk/aws-lambda-python-alpha",
|
|
2800
2878
|
"readme": {
|
|
2801
|
-
"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 index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n
|
|
2879
|
+
"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/master/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 buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});\n```\n\nThis type of an example should work for `pip` and `poetry` based dependencies, but will not work for `pipenv`.\n"
|
|
2802
2880
|
},
|
|
2803
2881
|
"repository": {
|
|
2804
2882
|
"directory": "packages/individual-packages/aws-lambda-python",
|
|
@@ -2836,11 +2914,135 @@
|
|
|
2836
2914
|
}
|
|
2837
2915
|
},
|
|
2838
2916
|
"types": {
|
|
2917
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions": {
|
|
2918
|
+
"assembly": "@aws-cdk/aws-lambda-python-alpha",
|
|
2919
|
+
"datatype": true,
|
|
2920
|
+
"docs": {
|
|
2921
|
+
"custom": {
|
|
2922
|
+
"exampleMetadata": "infused"
|
|
2923
|
+
},
|
|
2924
|
+
"example": "const 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});",
|
|
2925
|
+
"stability": "experimental",
|
|
2926
|
+
"summary": "Options for bundling."
|
|
2927
|
+
},
|
|
2928
|
+
"fqn": "@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
2929
|
+
"kind": "interface",
|
|
2930
|
+
"locationInModule": {
|
|
2931
|
+
"filename": "lib/types.ts",
|
|
2932
|
+
"line": 7
|
|
2933
|
+
},
|
|
2934
|
+
"name": "BundlingOptions",
|
|
2935
|
+
"properties": [
|
|
2936
|
+
{
|
|
2937
|
+
"abstract": true,
|
|
2938
|
+
"docs": {
|
|
2939
|
+
"default": "- Based on `assetHashType`",
|
|
2940
|
+
"remarks": "If `assetHashType` is set it must\nbe set to `AssetHashType.CUSTOM`. For consistency, this custom hash will\nbe SHA256 hashed and encoded as hex. The resulting hash will be the asset\nhash.\n\nNOTE: the hash is used in order to identify a specific revision of the asset, and\nused for optimizing and caching deployment activities related to this asset such as\npackaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will\nneed to make sure it is updated every time the asset changes, or otherwise it is\npossible that some deployments will not be invalidated.",
|
|
2941
|
+
"stability": "experimental",
|
|
2942
|
+
"summary": "Specify a custom hash for this asset."
|
|
2943
|
+
},
|
|
2944
|
+
"immutable": true,
|
|
2945
|
+
"locationInModule": {
|
|
2946
|
+
"filename": "lib/types.ts",
|
|
2947
|
+
"line": 71
|
|
2948
|
+
},
|
|
2949
|
+
"name": "assetHash",
|
|
2950
|
+
"optional": true,
|
|
2951
|
+
"type": {
|
|
2952
|
+
"primitive": "string"
|
|
2953
|
+
}
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
"abstract": true,
|
|
2957
|
+
"docs": {
|
|
2958
|
+
"default": "AssetHashType.SOURCE By default, hash is calculated based on the\ncontents of the source directory. This means that only updates to the\nsource will cause the asset to rebuild.",
|
|
2959
|
+
"remarks": "If asset hash is set to `SOURCE` (default), then only changes to the source\ndirectory will cause the asset to rebuild. This means, for example, that in\norder to pick up a new dependency version, a change must be made to the\nsource tree. Ideally, this can be implemented by including a dependency\nlockfile in your source tree or using fixed dependencies.\n\nIf the asset hash is set to `OUTPUT`, the hash is calculated after\nbundling. This means that any change in the output will cause the asset to\nbe invalidated and uploaded. Bear in mind that `pip` adds timestamps to\ndependencies it installs, which implies that in this mode Python bundles\nwill _always_ get rebuild and uploaded. Normally this is an anti-pattern\nsince build",
|
|
2960
|
+
"stability": "experimental",
|
|
2961
|
+
"summary": "Determines how asset hash is calculated. Assets will get rebuild and uploaded only if their hash has changed."
|
|
2962
|
+
},
|
|
2963
|
+
"immutable": true,
|
|
2964
|
+
"locationInModule": {
|
|
2965
|
+
"filename": "lib/types.ts",
|
|
2966
|
+
"line": 55
|
|
2967
|
+
},
|
|
2968
|
+
"name": "assetHashType",
|
|
2969
|
+
"optional": true,
|
|
2970
|
+
"type": {
|
|
2971
|
+
"fqn": "aws-cdk-lib.AssetHashType"
|
|
2972
|
+
}
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
"abstract": true,
|
|
2976
|
+
"docs": {
|
|
2977
|
+
"default": "- No build arguments.",
|
|
2978
|
+
"remarks": "This can be used to customize\nthe index URLs used for installing dependencies.\nThis is not used if a custom image is provided.",
|
|
2979
|
+
"stability": "experimental",
|
|
2980
|
+
"summary": "Optional build arguments to pass to the default container."
|
|
2981
|
+
},
|
|
2982
|
+
"immutable": true,
|
|
2983
|
+
"locationInModule": {
|
|
2984
|
+
"filename": "lib/types.ts",
|
|
2985
|
+
"line": 31
|
|
2986
|
+
},
|
|
2987
|
+
"name": "buildArgs",
|
|
2988
|
+
"optional": true,
|
|
2989
|
+
"type": {
|
|
2990
|
+
"collection": {
|
|
2991
|
+
"elementtype": {
|
|
2992
|
+
"primitive": "string"
|
|
2993
|
+
},
|
|
2994
|
+
"kind": "map"
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
},
|
|
2998
|
+
{
|
|
2999
|
+
"abstract": true,
|
|
3000
|
+
"docs": {
|
|
3001
|
+
"default": "- Default bundling image.",
|
|
3002
|
+
"remarks": "If no options are provided, the default bundling image\nwill be used. Dependencies will be installed using the default packaging commands\nand copied over from into the Lambda asset.",
|
|
3003
|
+
"stability": "experimental",
|
|
3004
|
+
"summary": "Docker image to use for bundling."
|
|
3005
|
+
},
|
|
3006
|
+
"immutable": true,
|
|
3007
|
+
"locationInModule": {
|
|
3008
|
+
"filename": "lib/types.ts",
|
|
3009
|
+
"line": 22
|
|
3010
|
+
},
|
|
3011
|
+
"name": "image",
|
|
3012
|
+
"optional": true,
|
|
3013
|
+
"type": {
|
|
3014
|
+
"fqn": "aws-cdk-lib.DockerImage"
|
|
3015
|
+
}
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"abstract": true,
|
|
3019
|
+
"docs": {
|
|
3020
|
+
"default": "- 'python' for a layer, empty string otherwise.",
|
|
3021
|
+
"stability": "experimental",
|
|
3022
|
+
"summary": "Output path suffix: the suffix for the directory into which the bundled output is written."
|
|
3023
|
+
},
|
|
3024
|
+
"immutable": true,
|
|
3025
|
+
"locationInModule": {
|
|
3026
|
+
"filename": "lib/types.ts",
|
|
3027
|
+
"line": 13
|
|
3028
|
+
},
|
|
3029
|
+
"name": "outputPathSuffix",
|
|
3030
|
+
"optional": true,
|
|
3031
|
+
"type": {
|
|
3032
|
+
"primitive": "string"
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
],
|
|
3036
|
+
"symbolId": "lib/types:BundlingOptions"
|
|
3037
|
+
},
|
|
2839
3038
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunction": {
|
|
2840
3039
|
"assembly": "@aws-cdk/aws-lambda-python-alpha",
|
|
2841
3040
|
"base": "aws-cdk-lib.aws_lambda.Function",
|
|
2842
3041
|
"docs": {
|
|
2843
|
-
"
|
|
3042
|
+
"custom": {
|
|
3043
|
+
"exampleMetadata": "infused"
|
|
3044
|
+
},
|
|
3045
|
+
"example": "const 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});",
|
|
2844
3046
|
"stability": "experimental",
|
|
2845
3047
|
"summary": "A Python Lambda function."
|
|
2846
3048
|
},
|
|
@@ -2851,7 +3053,7 @@
|
|
|
2851
3053
|
},
|
|
2852
3054
|
"locationInModule": {
|
|
2853
3055
|
"filename": "lib/function.ts",
|
|
2854
|
-
"line":
|
|
3056
|
+
"line": 53
|
|
2855
3057
|
},
|
|
2856
3058
|
"parameters": [
|
|
2857
3059
|
{
|
|
@@ -2877,7 +3079,7 @@
|
|
|
2877
3079
|
"kind": "class",
|
|
2878
3080
|
"locationInModule": {
|
|
2879
3081
|
"filename": "lib/function.ts",
|
|
2880
|
-
"line":
|
|
3082
|
+
"line": 52
|
|
2881
3083
|
},
|
|
2882
3084
|
"name": "PythonFunction",
|
|
2883
3085
|
"symbolId": "lib/function:PythonFunction"
|
|
@@ -2886,7 +3088,10 @@
|
|
|
2886
3088
|
"assembly": "@aws-cdk/aws-lambda-python-alpha",
|
|
2887
3089
|
"datatype": true,
|
|
2888
3090
|
"docs": {
|
|
2889
|
-
"
|
|
3091
|
+
"custom": {
|
|
3092
|
+
"exampleMetadata": "infused"
|
|
3093
|
+
},
|
|
3094
|
+
"example": "const 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});",
|
|
2890
3095
|
"stability": "experimental",
|
|
2891
3096
|
"summary": "Properties for a PythonFunction."
|
|
2892
3097
|
},
|
|
@@ -2905,7 +3110,7 @@
|
|
|
2905
3110
|
"abstract": true,
|
|
2906
3111
|
"docs": {
|
|
2907
3112
|
"stability": "experimental",
|
|
2908
|
-
"summary": "
|
|
3113
|
+
"summary": "Path to the source of the function or the location for dependencies."
|
|
2909
3114
|
},
|
|
2910
3115
|
"immutable": true,
|
|
2911
3116
|
"locationInModule": {
|
|
@@ -2920,39 +3125,38 @@
|
|
|
2920
3125
|
{
|
|
2921
3126
|
"abstract": true,
|
|
2922
3127
|
"docs": {
|
|
2923
|
-
"default": "
|
|
2924
|
-
"remarks": "
|
|
3128
|
+
"default": "Runtime.PYTHON_3_7",
|
|
3129
|
+
"remarks": "Only runtimes of the Python family are\nsupported.",
|
|
2925
3130
|
"stability": "experimental",
|
|
2926
|
-
"summary": "
|
|
3131
|
+
"summary": "The runtime environment."
|
|
2927
3132
|
},
|
|
2928
3133
|
"immutable": true,
|
|
2929
3134
|
"locationInModule": {
|
|
2930
3135
|
"filename": "lib/function.ts",
|
|
2931
|
-
"line":
|
|
3136
|
+
"line": 24
|
|
2932
3137
|
},
|
|
2933
|
-
"name": "
|
|
2934
|
-
"optional": true,
|
|
3138
|
+
"name": "runtime",
|
|
2935
3139
|
"type": {
|
|
2936
|
-
"
|
|
3140
|
+
"fqn": "aws-cdk-lib.aws_lambda.Runtime"
|
|
2937
3141
|
}
|
|
2938
3142
|
},
|
|
2939
3143
|
{
|
|
2940
3144
|
"abstract": true,
|
|
2941
3145
|
"docs": {
|
|
2942
|
-
"default": "
|
|
2943
|
-
"remarks": "
|
|
3146
|
+
"default": "- Use the default bundling Docker image, with x86_64 architecture.",
|
|
3147
|
+
"remarks": "Use this to specify custom bundling options like\nthe bundling Docker image, asset hash type, custom hash, architecture, etc.",
|
|
2944
3148
|
"stability": "experimental",
|
|
2945
|
-
"summary": "
|
|
3149
|
+
"summary": "Bundling options to use for this function."
|
|
2946
3150
|
},
|
|
2947
3151
|
"immutable": true,
|
|
2948
3152
|
"locationInModule": {
|
|
2949
3153
|
"filename": "lib/function.ts",
|
|
2950
|
-
"line":
|
|
3154
|
+
"line": 46
|
|
2951
3155
|
},
|
|
2952
|
-
"name": "
|
|
3156
|
+
"name": "bundling",
|
|
2953
3157
|
"optional": true,
|
|
2954
3158
|
"type": {
|
|
2955
|
-
"fqn": "aws-cdk-
|
|
3159
|
+
"fqn": "@aws-cdk/aws-lambda-python-alpha.BundlingOptions"
|
|
2956
3160
|
}
|
|
2957
3161
|
},
|
|
2958
3162
|
{
|
|
@@ -2965,7 +3169,7 @@
|
|
|
2965
3169
|
"immutable": true,
|
|
2966
3170
|
"locationInModule": {
|
|
2967
3171
|
"filename": "lib/function.ts",
|
|
2968
|
-
"line":
|
|
3172
|
+
"line": 38
|
|
2969
3173
|
},
|
|
2970
3174
|
"name": "handler",
|
|
2971
3175
|
"optional": true,
|
|
@@ -2983,32 +3187,13 @@
|
|
|
2983
3187
|
"immutable": true,
|
|
2984
3188
|
"locationInModule": {
|
|
2985
3189
|
"filename": "lib/function.ts",
|
|
2986
|
-
"line":
|
|
3190
|
+
"line": 31
|
|
2987
3191
|
},
|
|
2988
3192
|
"name": "index",
|
|
2989
3193
|
"optional": true,
|
|
2990
3194
|
"type": {
|
|
2991
3195
|
"primitive": "string"
|
|
2992
3196
|
}
|
|
2993
|
-
},
|
|
2994
|
-
{
|
|
2995
|
-
"abstract": true,
|
|
2996
|
-
"docs": {
|
|
2997
|
-
"default": "lambda.Runtime.PYTHON_3_7",
|
|
2998
|
-
"remarks": "Only runtimes of the Python family are\nsupported.",
|
|
2999
|
-
"stability": "experimental",
|
|
3000
|
-
"summary": "The runtime environment."
|
|
3001
|
-
},
|
|
3002
|
-
"immutable": true,
|
|
3003
|
-
"locationInModule": {
|
|
3004
|
-
"filename": "lib/function.ts",
|
|
3005
|
-
"line": 37
|
|
3006
|
-
},
|
|
3007
|
-
"name": "runtime",
|
|
3008
|
-
"optional": true,
|
|
3009
|
-
"type": {
|
|
3010
|
-
"fqn": "aws-cdk-lib.aws_lambda.Runtime"
|
|
3011
|
-
}
|
|
3012
3197
|
}
|
|
3013
3198
|
],
|
|
3014
3199
|
"symbolId": "lib/function:PythonFunctionProps"
|
|
@@ -3017,7 +3202,10 @@
|
|
|
3017
3202
|
"assembly": "@aws-cdk/aws-lambda-python-alpha",
|
|
3018
3203
|
"base": "aws-cdk-lib.aws_lambda.LayerVersion",
|
|
3019
3204
|
"docs": {
|
|
3020
|
-
"
|
|
3205
|
+
"custom": {
|
|
3206
|
+
"exampleMetadata": "infused"
|
|
3207
|
+
},
|
|
3208
|
+
"example": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
|
|
3021
3209
|
"stability": "experimental",
|
|
3022
3210
|
"summary": "A lambda layer version."
|
|
3023
3211
|
},
|
|
@@ -3028,7 +3216,7 @@
|
|
|
3028
3216
|
},
|
|
3029
3217
|
"locationInModule": {
|
|
3030
3218
|
"filename": "lib/layer.ts",
|
|
3031
|
-
"line":
|
|
3219
|
+
"line": 42
|
|
3032
3220
|
},
|
|
3033
3221
|
"parameters": [
|
|
3034
3222
|
{
|
|
@@ -3054,7 +3242,7 @@
|
|
|
3054
3242
|
"kind": "class",
|
|
3055
3243
|
"locationInModule": {
|
|
3056
3244
|
"filename": "lib/layer.ts",
|
|
3057
|
-
"line":
|
|
3245
|
+
"line": 41
|
|
3058
3246
|
},
|
|
3059
3247
|
"name": "PythonLayerVersion",
|
|
3060
3248
|
"symbolId": "lib/layer:PythonLayerVersion"
|
|
@@ -3063,7 +3251,10 @@
|
|
|
3063
3251
|
"assembly": "@aws-cdk/aws-lambda-python-alpha",
|
|
3064
3252
|
"datatype": true,
|
|
3065
3253
|
"docs": {
|
|
3066
|
-
"
|
|
3254
|
+
"custom": {
|
|
3255
|
+
"exampleMetadata": "infused"
|
|
3256
|
+
},
|
|
3257
|
+
"example": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
|
|
3067
3258
|
"stability": "experimental",
|
|
3068
3259
|
"summary": "Properties for PythonLayerVersion."
|
|
3069
3260
|
},
|
|
@@ -3074,7 +3265,7 @@
|
|
|
3074
3265
|
"kind": "interface",
|
|
3075
3266
|
"locationInModule": {
|
|
3076
3267
|
"filename": "lib/layer.ts",
|
|
3077
|
-
"line":
|
|
3268
|
+
"line": 10
|
|
3078
3269
|
},
|
|
3079
3270
|
"name": "PythonLayerVersionProps",
|
|
3080
3271
|
"properties": [
|
|
@@ -3087,13 +3278,32 @@
|
|
|
3087
3278
|
"immutable": true,
|
|
3088
3279
|
"locationInModule": {
|
|
3089
3280
|
"filename": "lib/layer.ts",
|
|
3090
|
-
"line":
|
|
3281
|
+
"line": 14
|
|
3091
3282
|
},
|
|
3092
3283
|
"name": "entry",
|
|
3093
3284
|
"type": {
|
|
3094
3285
|
"primitive": "string"
|
|
3095
3286
|
}
|
|
3096
3287
|
},
|
|
3288
|
+
{
|
|
3289
|
+
"abstract": true,
|
|
3290
|
+
"docs": {
|
|
3291
|
+
"default": "- Use the default bundling Docker image, with x86_64 architecture.",
|
|
3292
|
+
"remarks": "Use this to specify custom bundling options like\nthe bundling Docker image, asset hash type, custom hash, architecture, etc.",
|
|
3293
|
+
"stability": "experimental",
|
|
3294
|
+
"summary": "Bundling options to use for this function."
|
|
3295
|
+
},
|
|
3296
|
+
"immutable": true,
|
|
3297
|
+
"locationInModule": {
|
|
3298
|
+
"filename": "lib/layer.ts",
|
|
3299
|
+
"line": 34
|
|
3300
|
+
},
|
|
3301
|
+
"name": "bundling",
|
|
3302
|
+
"optional": true,
|
|
3303
|
+
"type": {
|
|
3304
|
+
"fqn": "@aws-cdk/aws-lambda-python-alpha.BundlingOptions"
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3097
3307
|
{
|
|
3098
3308
|
"abstract": true,
|
|
3099
3309
|
"docs": {
|
|
@@ -3104,7 +3314,7 @@
|
|
|
3104
3314
|
"immutable": true,
|
|
3105
3315
|
"locationInModule": {
|
|
3106
3316
|
"filename": "lib/layer.ts",
|
|
3107
|
-
"line":
|
|
3317
|
+
"line": 27
|
|
3108
3318
|
},
|
|
3109
3319
|
"name": "compatibleArchitectures",
|
|
3110
3320
|
"optional": true,
|
|
@@ -3120,14 +3330,14 @@
|
|
|
3120
3330
|
{
|
|
3121
3331
|
"abstract": true,
|
|
3122
3332
|
"docs": {
|
|
3123
|
-
"default": "-
|
|
3333
|
+
"default": "- Only Python 3.7 is supported.",
|
|
3124
3334
|
"stability": "experimental",
|
|
3125
3335
|
"summary": "The runtimes compatible with the python layer."
|
|
3126
3336
|
},
|
|
3127
3337
|
"immutable": true,
|
|
3128
3338
|
"locationInModule": {
|
|
3129
3339
|
"filename": "lib/layer.ts",
|
|
3130
|
-
"line":
|
|
3340
|
+
"line": 21
|
|
3131
3341
|
},
|
|
3132
3342
|
"name": "compatibleRuntimes",
|
|
3133
3343
|
"optional": true,
|
|
@@ -3144,6 +3354,6 @@
|
|
|
3144
3354
|
"symbolId": "lib/layer:PythonLayerVersionProps"
|
|
3145
3355
|
}
|
|
3146
3356
|
},
|
|
3147
|
-
"version": "2.
|
|
3357
|
+
"version": "2.5.0-alpha.0",
|
|
3148
3358
|
"fingerprint": "**********"
|
|
3149
3359
|
}
|