# S3ObjectProperty

The S3 location of the function code.

- Source: Generated at build time
- Type last changed: v2.273.0 · 8 Oct 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 s3ObjectProperty: lambda.CfnWebFunctionRevision.S3ObjectProperty = {
  bucket: 'bucket',
  key: 'key',

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

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_

s3_object_property = lambda.CfnWebFunctionRevision.S3ObjectProperty(
    bucket="bucket",
    key="key",

    # the properties below are optional
    version_id="versionId"
)
```

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.*;

S3ObjectProperty s3ObjectProperty = S3ObjectProperty.builder()
        .bucket("bucket")
        .key("key")

        // the properties below are optional
        .versionId("versionId")
        .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 s3ObjectProperty = new S3ObjectProperty {
    Bucket = "bucket",
    Key = "key",

    // the properties below are optional
    VersionId = "versionId"
};
```

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"

s3ObjectProperty := &S3ObjectProperty{
	Bucket: jsii.String("bucket"),
	Key: jsii.String("key"),

	// the properties below are optional
	VersionId: jsii.String("versionId"),
}
```

## Properties

- `bucket`: string (required) — The S3 bucket name.

- `key`: string (required) — The S3 object key.

- `versionId`: string — The S3 object version ID.
