Skip to content

Lambda  >  Operations  >  publish_layer_version

publish_layer_version

Operation

publish_layer_version async

publish_layer_version(input: PublishLayerVersionInput, plugins: list[Plugin] | None = None) -> PublishLayerVersionOutput

Creates an Lambda layer from a ZIP archive. Each time you call PublishLayerVersion with the same layer name, a new version is created.

Add layers to your function with CreateFunction or UpdateFunctionConfiguration.

Parameters:

Name Type Description Default
input PublishLayerVersionInput

An instance of PublishLayerVersionInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
PublishLayerVersionOutput

An instance of PublishLayerVersionOutput.

Input

PublishLayerVersionInput dataclass

Dataclass for PublishLayerVersionInput structure.

Attributes

compatible_architectures class-attribute instance-attribute
compatible_architectures: list[Architecture] | None = None

A list of compatible instruction set architectures.

compatible_runtimes class-attribute instance-attribute
compatible_runtimes: list[Runtime] | None = None

A list of compatible function runtimes. Used for filtering with ListLayers and ListLayerVersions.

The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.

content class-attribute instance-attribute
content: LayerVersionContentInput | None = None

The function layer archive.

description class-attribute instance-attribute
description: str | None = None

The description of the version.

layer_name class-attribute instance-attribute
layer_name: str | None = None

The name or Amazon Resource Name (ARN) of the layer.

license_info class-attribute instance-attribute
license_info: str | None = None

The layer's software license. It can be any of the following:

  • An SPDX license identifier. For example, MIT.

  • The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT.

  • The full text of the license.

Output

PublishLayerVersionOutput dataclass

Dataclass for PublishLayerVersionOutput structure.

Attributes

compatible_architectures class-attribute instance-attribute
compatible_architectures: list[Architecture] | None = None

A list of compatible instruction set architectures.

compatible_runtimes class-attribute instance-attribute
compatible_runtimes: list[Runtime] | None = None

The layer's compatible runtimes.

The following list includes deprecated runtimes. For more information, see Runtime use after deprecation.

For a list of all currently supported runtimes, see Supported runtimes.

content class-attribute instance-attribute
content: LayerVersionContentOutput | None = None

Details about the layer version.

created_date class-attribute instance-attribute
created_date: str | None = None

The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).

description class-attribute instance-attribute
description: str | None = None

The description of the version.

layer_arn class-attribute instance-attribute
layer_arn: str | None = None

The ARN of the layer.

layer_version_arn class-attribute instance-attribute
layer_version_arn: str | None = None

The ARN of the layer version.

license_info class-attribute instance-attribute
license_info: str | None = None

The layer's software license.

version class-attribute instance-attribute
version: int = 0

The version number.