interface PythonLayerVersionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.Python.PythonLayerVersionProps |
Java | software.amazon.awscdk.services.lambda.python.PythonLayerVersionProps |
Python | aws_cdk.aws_lambda_python.PythonLayerVersionProps |
TypeScript (source) | @aws-cdk/aws-lambda-python » PythonLayerVersionProps |
Properties for PythonLayerVersion.
Example
new lambda.PythonLayerVersion(this, 'MyLayer', {
entry: '/path/to/my/layer', // point this to your library's directory
})
Properties
Name | Type | Description |
---|---|---|
entry | string | The path to the root directory of the lambda layer. |
bundling? | Bundling | Bundling options to use for this function. |
compatible | Architecture [] | The system architectures compatible with this layer. |
compatible | Runtime [] | The runtimes compatible with the python layer. |
description? | string | The description the this Lambda Layer. |
layer | string | The name of the layer. |
license? | string | The SPDX licence identifier or URL to the license file for this layer. |
removal | Removal | Whether to retain this version of the layer when a new version is added or when the stack is deleted. |
entry
Type:
string
The path to the root directory of the lambda layer.
bundling?
Type:
Bundling
(optional, default: Use the default bundling Docker image, with x86_64 architecture.)
Bundling options to use for this function.
Use this to specify custom bundling options like the bundling Docker image, asset hash type, custom hash, architecture, etc.
compatibleArchitectures?
Type:
Architecture
[]
(optional, default: [Architecture.X86_64])
The system architectures compatible with this layer.
compatibleRuntimes?
Type:
Runtime
[]
(optional, default: Only Python 3.7 is supported.)
The runtimes compatible with the python layer.
description?
Type:
string
(optional, default: No description.)
The description the this Lambda Layer.
layerVersionName?
Type:
string
(optional, default: A name will be generated.)
The name of the layer.
license?
Type:
string
(optional, default: No license information will be recorded.)
The SPDX licence identifier or URL to the license file for this layer.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY)
Whether to retain this version of the layer when a new version is added or when the stack is deleted.