v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1466347371.7 KB

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.

post/2018-10-31/layers/{LayerName}/versions

Path parameters

LayerNamestring required

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

Request body

Descriptionstring

The description of the version.

CompatibleRuntimesRuntime[]

A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">function runtimes</a>. Used for filtering with <a>ListLayers</a> and <a>ListLayerVersions</a>.

LicenseInfostring
<p>The layer's software license. It can be any of the following:</p> <ul> <li> <p>An <a href="https://spdx.org/licenses/">SPDX license identifier</a>. For example, <code>MIT</code>.</p> </li> <li> <p>The URL of a license hosted on the internet. For example, <code>https://opensource.org/licenses/MIT</code>.</p> </li> <li> <p>The full text of the license.</p> </li> </ul>
CompatibleArchitecturesArchitecture[]

A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.

Response

Success

LayerArnstring

The ARN of the layer.

LayerVersionArnstring

The ARN of the layer version.

Descriptionstring

The description of the version.

CreatedDatestring

The date that the layer version was created, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).

Versioninteger

The version number.

CompatibleRuntimesRuntime[]

The layer's compatible runtimes.

LicenseInfostring

The layer's software license.

CompatibleArchitecturesArchitecture[]

A list of compatible <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html">instruction set architectures</a>.