Skip to content
v2.273.0

CfnLayerVersionProps Struct ​

Properties for defining a CfnLayerVersion.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const cfnLayerVersionProps: lambda.CfnLayerVersionProps = {
  content: {
    s3Bucket: 's3Bucket',
    s3Key: 's3Key',

    // the properties below are optional
    s3ObjectStorageMode: 's3ObjectStorageMode',
    s3ObjectVersion: 's3ObjectVersion',
  },

  // the properties below are optional
  compatibleArchitectures: ['compatibleArchitectures'],
  compatibleRuntimes: ['compatibleRuntimes'],
  description: 'description',
  layerName: 'layerName',
  licenseInfo: 'licenseInfo',
};

Properties ​

compatibleArchitecturesstring[]compatible_architecturestyping.List[str]compatibleArchitecturesList<String>CompatibleArchitecturesstring[]CompatibleArchitectures*[]*string#
A list of compatible [instruction set architectures](https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html) .
compatibleRuntimesstring[]compatible_runtimestyping.List[str]compatibleRuntimesList<String>CompatibleRuntimesstring[]CompatibleRuntimes*[]*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) .
contentIResolvable | CfnLayerVersion.ContentPropertycontenttyping.Union[IResolvable, ContentProperty]contentIResolvableContentIResolvableContentinterface{}required#
The function layer archive.
descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string#
The description of the version.
layerNamestringlayer_namestrlayerNameStringLayerNamestringLayerName*string#
The name or Amazon Resource Name (ARN) of the layer.
licenseInfostringlicense_infostrlicenseInfoStringLicenseInfostringLicenseInfo*string#
The layer's software license. It can be any of the following:.
notes
  • 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.

Used as props by ​