AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Lambda::LayerVersion

CfnLayerVersion

The `AWS::Lambda::LayerVersion` resource creates a [Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) from a ZIP archive.

Import

import { CfnLayerVersion } from 'aws-cdk-lib/aws-lambda';

Or use the module namespace:

import * as lambda from 'aws-cdk-lib/aws-lambda';
// lambda.CfnLayerVersion

Properties

Configuration passed to the constructor as CfnLayerVersionProps.

contentRequired
IResolvable | ContentProperty

The function layer archive.

compatibleArchitecturesOptional
string[]

A list of compatible [instruction set architectures](https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html) .

compatibleRuntimesOptional
string[]

A list of compatible [function runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) . Used for filtering with [ListLayers](https://docs.aws.amazon.com/lambda/latest/dg/API_ListLayers.html) and [ListLayerVersions](https://docs.aws.amazon.com/lambda/latest/dg/API_ListLayerVersions.html) .

descriptionOptional
string

The description of the version.

layerNameOptional
string

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

licenseInfoOptional
string

The layer's software license. It can be any of the following:. - An [SPDX license identifier](https://docs.aws.amazon.com/https://spdx.org/licenses/) . 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.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the AWS Lambda Cheat Sheet

Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.

Download Free Infographic