@aws-cdk/aws-lambda-python-alpha 2.2.0-alpha.0 → 2.6.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 CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "aws-cdk-lib": "^2.2.0",
11
+ "aws-cdk-lib": "^2.6.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -2855,7 +2855,7 @@
2855
2855
  "stability": "experimental"
2856
2856
  },
2857
2857
  "homepage": "https://github.com/aws/aws-cdk",
2858
- "jsiiVersion": "1.47.0 (build 86d2c33)",
2858
+ "jsiiVersion": "1.50.0 (build d1830a4)",
2859
2859
  "keywords": [
2860
2860
  "aws",
2861
2861
  "cdk",
@@ -2876,7 +2876,7 @@
2876
2876
  },
2877
2877
  "name": "@aws-cdk/aws-lambda-python-alpha",
2878
2878
  "readme": {
2879
- "markdown": "# Amazon Lambda Python Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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 runtime: Runtime.PYTHON_3_6, // optional, defaults to lambda.Runtime.PYTHON_3_7\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## Module Dependencies\n\nIf `requirements.txt` or `Pipfile` exists at the entry path, the construct will handle installing\nall required modules in a [Lambda compatible Docker container](https://gallery.ecr.aws/sam/build-python3.7)\naccording 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.\nThis 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 has 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\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 # has to be present at the entry path\n├── poetry.lock # your poetry lock file\n```\n\n**Lambda Layer Support**\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\n```ts\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\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"
2879
+ "markdown": "# Amazon Lambda Python Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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"
2880
2880
  },
2881
2881
  "repository": {
2882
2882
  "directory": "packages/individual-packages/aws-lambda-python",
@@ -2914,11 +2914,135 @@
2914
2914
  }
2915
2915
  },
2916
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
+ },
2917
3038
  "@aws-cdk/aws-lambda-python-alpha.PythonFunction": {
2918
3039
  "assembly": "@aws-cdk/aws-lambda-python-alpha",
2919
3040
  "base": "aws-cdk-lib.aws_lambda.Function",
2920
3041
  "docs": {
2921
- "example": "new 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 runtime: Runtime.PYTHON_3_6, // optional, defaults to lambda.Runtime.PYTHON_3_7\n});",
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});",
2922
3046
  "stability": "experimental",
2923
3047
  "summary": "A Python Lambda function."
2924
3048
  },
@@ -2929,7 +3053,7 @@
2929
3053
  },
2930
3054
  "locationInModule": {
2931
3055
  "filename": "lib/function.ts",
2932
- "line": 83
3056
+ "line": 53
2933
3057
  },
2934
3058
  "parameters": [
2935
3059
  {
@@ -2955,7 +3079,7 @@
2955
3079
  "kind": "class",
2956
3080
  "locationInModule": {
2957
3081
  "filename": "lib/function.ts",
2958
- "line": 82
3082
+ "line": 52
2959
3083
  },
2960
3084
  "name": "PythonFunction",
2961
3085
  "symbolId": "lib/function:PythonFunction"
@@ -2964,7 +3088,10 @@
2964
3088
  "assembly": "@aws-cdk/aws-lambda-python-alpha",
2965
3089
  "datatype": true,
2966
3090
  "docs": {
2967
- "example": "new 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 runtime: Runtime.PYTHON_3_6, // optional, defaults to lambda.Runtime.PYTHON_3_7\n});",
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});",
2968
3095
  "stability": "experimental",
2969
3096
  "summary": "Properties for a PythonFunction."
2970
3097
  },
@@ -2983,7 +3110,7 @@
2983
3110
  "abstract": true,
2984
3111
  "docs": {
2985
3112
  "stability": "experimental",
2986
- "summary": "The path to the root directory of the function."
3113
+ "summary": "Path to the source of the function or the location for dependencies."
2987
3114
  },
2988
3115
  "immutable": true,
2989
3116
  "locationInModule": {
@@ -2998,39 +3125,38 @@
2998
3125
  {
2999
3126
  "abstract": true,
3000
3127
  "docs": {
3001
- "default": "- based on `assetHashType`",
3002
- "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.",
3128
+ "default": "Runtime.PYTHON_3_7",
3129
+ "remarks": "Only runtimes of the Python family are\nsupported.",
3003
3130
  "stability": "experimental",
3004
- "summary": "Specify a custom hash for this asset."
3131
+ "summary": "The runtime environment."
3005
3132
  },
3006
3133
  "immutable": true,
3007
3134
  "locationInModule": {
3008
3135
  "filename": "lib/function.ts",
3009
- "line": 76
3136
+ "line": 24
3010
3137
  },
3011
- "name": "assetHash",
3012
- "optional": true,
3138
+ "name": "runtime",
3013
3139
  "type": {
3014
- "primitive": "string"
3140
+ "fqn": "aws-cdk-lib.aws_lambda.Runtime"
3015
3141
  }
3016
3142
  },
3017
3143
  {
3018
3144
  "abstract": true,
3019
3145
  "docs": {
3020
- "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.",
3021
- "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",
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.",
3022
3148
  "stability": "experimental",
3023
- "summary": "Determines how asset hash is calculated. Assets will get rebuild and uploaded only if their hash has changed."
3149
+ "summary": "Bundling options to use for this function."
3024
3150
  },
3025
3151
  "immutable": true,
3026
3152
  "locationInModule": {
3027
3153
  "filename": "lib/function.ts",
3028
- "line": 60
3154
+ "line": 46
3029
3155
  },
3030
- "name": "assetHashType",
3156
+ "name": "bundling",
3031
3157
  "optional": true,
3032
3158
  "type": {
3033
- "fqn": "aws-cdk-lib.AssetHashType"
3159
+ "fqn": "@aws-cdk/aws-lambda-python-alpha.BundlingOptions"
3034
3160
  }
3035
3161
  },
3036
3162
  {
@@ -3043,7 +3169,7 @@
3043
3169
  "immutable": true,
3044
3170
  "locationInModule": {
3045
3171
  "filename": "lib/function.ts",
3046
- "line": 29
3172
+ "line": 38
3047
3173
  },
3048
3174
  "name": "handler",
3049
3175
  "optional": true,
@@ -3061,32 +3187,13 @@
3061
3187
  "immutable": true,
3062
3188
  "locationInModule": {
3063
3189
  "filename": "lib/function.ts",
3064
- "line": 22
3190
+ "line": 31
3065
3191
  },
3066
3192
  "name": "index",
3067
3193
  "optional": true,
3068
3194
  "type": {
3069
3195
  "primitive": "string"
3070
3196
  }
3071
- },
3072
- {
3073
- "abstract": true,
3074
- "docs": {
3075
- "default": "lambda.Runtime.PYTHON_3_7",
3076
- "remarks": "Only runtimes of the Python family are\nsupported.",
3077
- "stability": "experimental",
3078
- "summary": "The runtime environment."
3079
- },
3080
- "immutable": true,
3081
- "locationInModule": {
3082
- "filename": "lib/function.ts",
3083
- "line": 37
3084
- },
3085
- "name": "runtime",
3086
- "optional": true,
3087
- "type": {
3088
- "fqn": "aws-cdk-lib.aws_lambda.Runtime"
3089
- }
3090
3197
  }
3091
3198
  ],
3092
3199
  "symbolId": "lib/function:PythonFunctionProps"
@@ -3095,7 +3202,10 @@
3095
3202
  "assembly": "@aws-cdk/aws-lambda-python-alpha",
3096
3203
  "base": "aws-cdk-lib.aws_lambda.LayerVersion",
3097
3204
  "docs": {
3098
- "example": "new lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});",
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})",
3099
3209
  "stability": "experimental",
3100
3210
  "summary": "A lambda layer version."
3101
3211
  },
@@ -3106,7 +3216,7 @@
3106
3216
  },
3107
3217
  "locationInModule": {
3108
3218
  "filename": "lib/layer.ts",
3109
- "line": 34
3219
+ "line": 42
3110
3220
  },
3111
3221
  "parameters": [
3112
3222
  {
@@ -3132,7 +3242,7 @@
3132
3242
  "kind": "class",
3133
3243
  "locationInModule": {
3134
3244
  "filename": "lib/layer.ts",
3135
- "line": 33
3245
+ "line": 41
3136
3246
  },
3137
3247
  "name": "PythonLayerVersion",
3138
3248
  "symbolId": "lib/layer:PythonLayerVersion"
@@ -3141,7 +3251,10 @@
3141
3251
  "assembly": "@aws-cdk/aws-lambda-python-alpha",
3142
3252
  "datatype": true,
3143
3253
  "docs": {
3144
- "example": "new lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});",
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})",
3145
3258
  "stability": "experimental",
3146
3259
  "summary": "Properties for PythonLayerVersion."
3147
3260
  },
@@ -3152,7 +3265,7 @@
3152
3265
  "kind": "interface",
3153
3266
  "locationInModule": {
3154
3267
  "filename": "lib/layer.ts",
3155
- "line": 9
3268
+ "line": 10
3156
3269
  },
3157
3270
  "name": "PythonLayerVersionProps",
3158
3271
  "properties": [
@@ -3165,13 +3278,32 @@
3165
3278
  "immutable": true,
3166
3279
  "locationInModule": {
3167
3280
  "filename": "lib/layer.ts",
3168
- "line": 13
3281
+ "line": 14
3169
3282
  },
3170
3283
  "name": "entry",
3171
3284
  "type": {
3172
3285
  "primitive": "string"
3173
3286
  }
3174
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
+ },
3175
3307
  {
3176
3308
  "abstract": true,
3177
3309
  "docs": {
@@ -3182,7 +3314,7 @@
3182
3314
  "immutable": true,
3183
3315
  "locationInModule": {
3184
3316
  "filename": "lib/layer.ts",
3185
- "line": 26
3317
+ "line": 27
3186
3318
  },
3187
3319
  "name": "compatibleArchitectures",
3188
3320
  "optional": true,
@@ -3198,14 +3330,14 @@
3198
3330
  {
3199
3331
  "abstract": true,
3200
3332
  "docs": {
3201
- "default": "- All runtimes are supported.",
3333
+ "default": "- Only Python 3.7 is supported.",
3202
3334
  "stability": "experimental",
3203
3335
  "summary": "The runtimes compatible with the python layer."
3204
3336
  },
3205
3337
  "immutable": true,
3206
3338
  "locationInModule": {
3207
3339
  "filename": "lib/layer.ts",
3208
- "line": 20
3340
+ "line": 21
3209
3341
  },
3210
3342
  "name": "compatibleRuntimes",
3211
3343
  "optional": true,
@@ -3222,6 +3354,6 @@
3222
3354
  "symbolId": "lib/layer:PythonLayerVersionProps"
3223
3355
  }
3224
3356
  },
3225
- "version": "2.2.0-alpha.0",
3357
+ "version": "2.6.0-alpha.0",
3226
3358
  "fingerprint": "**********"
3227
3359
  }