# LayerVersionProps

Extends: LayerVersionProps
Extends: LayerVersionOptions
Used as props by: LayerVersion

- Source: [`aws-lambda/lib/layers.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0/packages/aws-cdk-lib/aws-lambda/lib/layers.ts#L54)

## Example

```ts
new lambda.LayerVersion(this, 'MyLayer', {
  removalPolicy: RemovalPolicy.RETAIN,
  code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
  compatibleArchitectures: [lambda.Architecture.X86_64, lambda.Architecture.ARM_64],
});
```

## Properties

- `code`: [Code](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Code.html) (required) — The content of this Layer.

  Using `Code.fromInline` is not supported.

- `compatibleArchitectures`: [Architecture](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Architecture.html)[] = [Architecture.X86_64] — The system architectures compatible with this layer.

- `compatibleRuntimes`: [Runtime](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Runtime.html)[] — The runtimes compatible with this Layer.

  **Default:** All runtimes are supported.

- `description`: string — The description the this Lambda Layer.

  **Default:** No description.

- `layerVersionName`: string — The name of the layer.

  **Default:** A name will be generated.

- `license`: string — The SPDX licence identifier or URL to the license file for this layer.

  **Default:** No license information will be recorded.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.DESTROY — Whether to retain this version of the layer when a new version is added or when the stack is deleted.
