# CfnDirectoryBucketProps

Properties for defining a `CfnDirectoryBucket`.

Used as props by: [CfnDirectoryBucket](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3express.CfnDirectoryBucket.html)

- Source: Generated at build time
- Type last changed: v2.251.0 · 24 Apr 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_s3express as s3express } from 'aws-cdk-lib';
const cfnDirectoryBucketProps: s3express.CfnDirectoryBucketProps = {
  dataRedundancy: 'dataRedundancy',
  locationName: 'locationName',

  // the properties below are optional
  bucketEncryption: {
    serverSideEncryptionConfiguration: [{
      bucketKeyEnabled: false,
      serverSideEncryptionByDefault: {
        sseAlgorithm: 'sseAlgorithm',

        // the properties below are optional
        kmsMasterKeyId: 'kmsMasterKeyId',
      },
    }],
  },
  bucketName: 'bucketName',
  inventoryConfigurations: [{
    destination: {
      bucketArn: 'bucketArn',
      format: 'format',

      // the properties below are optional
      bucketAccountId: 'bucketAccountId',
      prefix: 'prefix',
    },
    enabled: false,
    id: 'id',
    includedObjectVersions: 'includedObjectVersions',
    scheduleFrequency: 'scheduleFrequency',

    // the properties below are optional
    optionalFields: ['optionalFields'],
    prefix: 'prefix',
  }],
  lifecycleConfiguration: {
    rules: [{
      status: 'status',

      // the properties below are optional
      abortIncompleteMultipartUpload: {
        daysAfterInitiation: 123,
      },
      expirationInDays: 123,
      id: 'id',
      objectSizeGreaterThan: 'objectSizeGreaterThan',
      objectSizeLessThan: 'objectSizeLessThan',
      prefix: 'prefix',
    }],
  },
  metricsConfigurations: [{
    id: 'id',

    // the properties below are optional
    accessPointArn: 'accessPointArn',
    prefix: 'prefix',
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

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

cfn_directory_bucket_props = s3express.CfnDirectoryBucketProps(
    data_redundancy="dataRedundancy",
    location_name="locationName",

    # the properties below are optional
    bucket_encryption=s3express.CfnDirectoryBucket.BucketEncryptionProperty(
        server_side_encryption_configuration=[s3express.CfnDirectoryBucket.ServerSideEncryptionRuleProperty(
            bucket_key_enabled=False,
            server_side_encryption_by_default=s3express.CfnDirectoryBucket.ServerSideEncryptionByDefaultProperty(
                sse_algorithm="sseAlgorithm",

                # the properties below are optional
                kms_master_key_id="kmsMasterKeyId"
            )
        )]
    ),
    bucket_name="bucketName",
    inventory_configurations=[s3express.CfnDirectoryBucket.InventoryConfigurationProperty(
        destination=s3express.CfnDirectoryBucket.DestinationProperty(
            bucket_arn="bucketArn",
            format="format",

            # the properties below are optional
            bucket_account_id="bucketAccountId",
            prefix="prefix"
        ),
        enabled=False,
        id="id",
        included_object_versions="includedObjectVersions",
        schedule_frequency="scheduleFrequency",

        # the properties below are optional
        optional_fields=["optionalFields"],
        prefix="prefix"
    )],
    lifecycle_configuration=s3express.CfnDirectoryBucket.LifecycleConfigurationProperty(
        rules=[s3express.CfnDirectoryBucket.RuleProperty(
            status="status",

            # the properties below are optional
            abort_incomplete_multipart_upload=s3express.CfnDirectoryBucket.AbortIncompleteMultipartUploadProperty(
                days_after_initiation=123
            ),
            expiration_in_days=123,
            id="id",
            object_size_greater_than="objectSizeGreaterThan",
            object_size_less_than="objectSizeLessThan",
            prefix="prefix"
        )]
    ),
    metrics_configurations=[s3express.CfnDirectoryBucket.MetricsConfigurationProperty(
        id="id",

        # the properties below are optional
        access_point_arn="accessPointArn",
        prefix="prefix"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

CfnDirectoryBucketProps cfnDirectoryBucketProps = CfnDirectoryBucketProps.builder()
        .dataRedundancy("dataRedundancy")
        .locationName("locationName")

        // the properties below are optional
        .bucketEncryption(BucketEncryptionProperty.builder()
                .serverSideEncryptionConfiguration(List.of(ServerSideEncryptionRuleProperty.builder()
                        .bucketKeyEnabled(false)
                        .serverSideEncryptionByDefault(ServerSideEncryptionByDefaultProperty.builder()
                                .sseAlgorithm("sseAlgorithm")

                                // the properties below are optional
                                .kmsMasterKeyId("kmsMasterKeyId")
                                .build())
                        .build()))
                .build())
        .bucketName("bucketName")
        .inventoryConfigurations(List.of(InventoryConfigurationProperty.builder()
                .destination(DestinationProperty.builder()
                        .bucketArn("bucketArn")
                        .format("format")

                        // the properties below are optional
                        .bucketAccountId("bucketAccountId")
                        .prefix("prefix")
                        .build())
                .enabled(false)
                .id("id")
                .includedObjectVersions("includedObjectVersions")
                .scheduleFrequency("scheduleFrequency")

                // the properties below are optional
                .optionalFields(List.of("optionalFields"))
                .prefix("prefix")
                .build()))
        .lifecycleConfiguration(LifecycleConfigurationProperty.builder()
                .rules(List.of(RuleProperty.builder()
                        .status("status")

                        // the properties below are optional
                        .abortIncompleteMultipartUpload(AbortIncompleteMultipartUploadProperty.builder()
                                .daysAfterInitiation(123)
                                .build())
                        .expirationInDays(123)
                        .id("id")
                        .objectSizeGreaterThan("objectSizeGreaterThan")
                        .objectSizeLessThan("objectSizeLessThan")
                        .prefix("prefix")
                        .build()))
                .build())
        .metricsConfigurations(List.of(MetricsConfigurationProperty.builder()
                .id("id")

                // the properties below are optional
                .accessPointArn("accessPointArn")
                .prefix("prefix")
                .build()))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.S3Express;

var cfnDirectoryBucketProps = new CfnDirectoryBucketProps {
    DataRedundancy = "dataRedundancy",
    LocationName = "locationName",

    // the properties below are optional
    BucketEncryption = new BucketEncryptionProperty {
        ServerSideEncryptionConfiguration = new [] { new ServerSideEncryptionRuleProperty {
            BucketKeyEnabled = false,
            ServerSideEncryptionByDefault = new ServerSideEncryptionByDefaultProperty {
                SseAlgorithm = "sseAlgorithm",

                // the properties below are optional
                KmsMasterKeyId = "kmsMasterKeyId"
            }
        } }
    },
    BucketName = "bucketName",
    InventoryConfigurations = new [] { new InventoryConfigurationProperty {
        Destination = new DestinationProperty {
            BucketArn = "bucketArn",
            Format = "format",

            // the properties below are optional
            BucketAccountId = "bucketAccountId",
            Prefix = "prefix"
        },
        Enabled = false,
        Id = "id",
        IncludedObjectVersions = "includedObjectVersions",
        ScheduleFrequency = "scheduleFrequency",

        // the properties below are optional
        OptionalFields = new [] { "optionalFields" },
        Prefix = "prefix"
    } },
    LifecycleConfiguration = new LifecycleConfigurationProperty {
        Rules = new [] { new RuleProperty {
            Status = "status",

            // the properties below are optional
            AbortIncompleteMultipartUpload = new AbortIncompleteMultipartUploadProperty {
                DaysAfterInitiation = 123
            },
            ExpirationInDays = 123,
            Id = "id",
            ObjectSizeGreaterThan = "objectSizeGreaterThan",
            ObjectSizeLessThan = "objectSizeLessThan",
            Prefix = "prefix"
        } }
    },
    MetricsConfigurations = new [] { new MetricsConfigurationProperty {
        Id = "id",

        // the properties below are optional
        AccessPointArn = "accessPointArn",
        Prefix = "prefix"
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnDirectoryBucketProps := &CfnDirectoryBucketProps{
	DataRedundancy: jsii.String("dataRedundancy"),
	LocationName: jsii.String("locationName"),

	// the properties below are optional
	BucketEncryption: &BucketEncryptionProperty{
		ServerSideEncryptionConfiguration: []interface{}{
			&ServerSideEncryptionRuleProperty{
				BucketKeyEnabled: jsii.Boolean(false),
				ServerSideEncryptionByDefault: &ServerSideEncryptionByDefaultProperty{
					SseAlgorithm: jsii.String("sseAlgorithm"),

					// the properties below are optional
					KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
				},
			},
		},
	},
	BucketName: jsii.String("bucketName"),
	InventoryConfigurations: []interface{}{
		&InventoryConfigurationProperty{
			Destination: &DestinationProperty{
				BucketArn: jsii.String("bucketArn"),
				Format: jsii.String("format"),

				// the properties below are optional
				BucketAccountId: jsii.String("bucketAccountId"),
				Prefix: jsii.String("prefix"),
			},
			Enabled: jsii.Boolean(false),
			Id: jsii.String("id"),
			IncludedObjectVersions: jsii.String("includedObjectVersions"),
			ScheduleFrequency: jsii.String("scheduleFrequency"),

			// the properties below are optional
			OptionalFields: []*string{
				jsii.String("optionalFields"),
			},
			Prefix: jsii.String("prefix"),
		},
	},
	LifecycleConfiguration: &LifecycleConfigurationProperty{
		Rules: []interface{}{
			&RuleProperty{
				Status: jsii.String("status"),

				// the properties below are optional
				AbortIncompleteMultipartUpload: &AbortIncompleteMultipartUploadProperty{
					DaysAfterInitiation: jsii.Number(123),
				},
				ExpirationInDays: jsii.Number(123),
				Id: jsii.String("id"),
				ObjectSizeGreaterThan: jsii.String("objectSizeGreaterThan"),
				ObjectSizeLessThan: jsii.String("objectSizeLessThan"),
				Prefix: jsii.String("prefix"),
			},
		},
	},
	MetricsConfigurations: []interface{}{
		&MetricsConfigurationProperty{
			Id: jsii.String("id"),

			// the properties below are optional
			AccessPointArn: jsii.String("accessPointArn"),
			Prefix: jsii.String("prefix"),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `bucketEncryption`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDirectoryBucket.BucketEncryptionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3express.CfnDirectoryBucket.BucketEncryptionProperty.html) — Specifies default encryption for a bucket using server-side encryption with Amazon S3 managed keys (SSE-S3) or AWS KMS keys (SSE-KMS).

  For information about default encryption for directory buckets, see [Setting and monitoring default encryption for directory buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-bucket-encryption.html) in the *Amazon S3 User Guide* .

- `bucketName`: string — A name for the bucket.

  The bucket name must contain only lowercase letters, numbers, and hyphens (-). A directory bucket name must be unique in the chosen Zone (Availability Zone or Local Zone). The bucket name must also follow the format `*bucket_base_name* -- *zone_id* --x-s3` (for example, `*bucket_base_name* -- *usw2-az1* --x-s3` ). If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. For information about bucket naming restrictions, see [Directory bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) in the *Amazon S3 User Guide* .

  > If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.

- `dataRedundancy`: string (required) — The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

- `inventoryConfigurations`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDirectoryBucket.InventoryConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3express.CfnDirectoryBucket.InventoryConfigurationProperty.html)[] — The inventory configuration for an Amazon S3 Express bucket.

- `lifecycleConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDirectoryBucket.LifecycleConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3express.CfnDirectoryBucket.LifecycleConfigurationProperty.html) — Container for lifecycle rules. You can add as many as 1000 rules.

  For more information see, [Creating and managing a lifecycle configuration for directory buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-lifecycle.html          ) in the *Amazon S3 User Guide* .

- `locationName`: string (required) — The name of the location where the bucket will be created.

  For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is `usw2-az1` .

- `metricsConfigurations`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDirectoryBucket.MetricsConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3express.CfnDirectoryBucket.MetricsConfigurationProperty.html)[] — Specifies the metrics configurations for the Amazon S3 Express bucket.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of tags that you can apply to the S3 directory bucket.

  Tags are key-value pairs of metadata used to categorize and organize your buckets, track costs, and control access. For more information, see [Using tags with directory buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html) .
