# ContentProperty

A ZIP archive that contains the contents of an [Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) .

- Source: Generated at build time
- Type last changed: v2.261.0 · 2 Jul 2026

## Example

TypeScript:

```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 contentProperty: lambda.CfnLayerVersion.ContentProperty = {
  s3Bucket: 's3Bucket',
  s3Key: 's3Key',

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

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

content_property = lambda.CfnLayerVersion.ContentProperty(
    s3_bucket="s3Bucket",
    s3_key="s3Key",

    # the properties below are optional
    s3_object_storage_mode="s3ObjectStorageMode",
    s3_object_version="s3ObjectVersion"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

ContentProperty contentProperty = ContentProperty.builder()
        .s3Bucket("s3Bucket")
        .s3Key("s3Key")

        // the properties below are optional
        .s3ObjectStorageMode("s3ObjectStorageMode")
        .s3ObjectVersion("s3ObjectVersion")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var contentProperty = new ContentProperty {
    S3Bucket = "s3Bucket",
    S3Key = "s3Key",

    // the properties below are optional
    S3ObjectStorageMode = "s3ObjectStorageMode",
    S3ObjectVersion = "s3ObjectVersion"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

contentProperty := &ContentProperty{
	S3Bucket: jsii.String("s3Bucket"),
	S3Key: jsii.String("s3Key"),

	// the properties below are optional
	S3ObjectStorageMode: jsii.String("s3ObjectStorageMode"),
	S3ObjectVersion: jsii.String("s3ObjectVersion"),
}
```

## Properties

- `s3Bucket`: string (required) — The Amazon S3 bucket of the layer archive.

- `s3Key`: string (required) — The Amazon S3 key of the layer archive.

- `s3ObjectStorageMode`: string — Specifies whether Lambda should copy the deployment package to its internal storage (COPY) or reference it directly from your S3 bucket (REFERENCE).

- `s3ObjectVersion`: string — For versioned objects, the version of the layer archive object to use.
