# S3FilesVolumeConfigurationProperty

This parameter is specified when you're using an Amazon S3 Files file system for task storage.

For more information, see [Amazon S3 Files volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/s3files-volumes.html) in the *Amazon Elastic Container Service Developer Guide*.
  Your task definition must include a Task IAM Role. See [IAM role for attaching your file system to compute resources](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-prereq-policies.html#s3-files-prereq-iam-compute-role) for required permissions.

- Source: Generated at build time
- Type last changed: v2.250.0 · 14 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_ecs as ecs } from 'aws-cdk-lib';
const s3FilesVolumeConfigurationProperty: ecs.CfnTaskDefinition.S3FilesVolumeConfigurationProperty = {
  fileSystemArn: 'fileSystemArn',

  // the properties below are optional
  accessPointArn: 'accessPointArn',
  rootDirectory: 'rootDirectory',
  transitEncryptionPort: 123,
};
```

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_ecs as ecs

s3_files_volume_configuration_property = ecs.CfnTaskDefinition.S3FilesVolumeConfigurationProperty(
    file_system_arn="fileSystemArn",

    # the properties below are optional
    access_point_arn="accessPointArn",
    root_directory="rootDirectory",
    transit_encryption_port=123
)
```

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

S3FilesVolumeConfigurationProperty s3FilesVolumeConfigurationProperty = S3FilesVolumeConfigurationProperty.builder()
        .fileSystemArn("fileSystemArn")

        // the properties below are optional
        .accessPointArn("accessPointArn")
        .rootDirectory("rootDirectory")
        .transitEncryptionPort(123)
        .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.ECS;

var s3FilesVolumeConfigurationProperty = new S3FilesVolumeConfigurationProperty {
    FileSystemArn = "fileSystemArn",

    // the properties below are optional
    AccessPointArn = "accessPointArn",
    RootDirectory = "rootDirectory",
    TransitEncryptionPort = 123
};
```

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"

s3FilesVolumeConfigurationProperty := &S3FilesVolumeConfigurationProperty{
	FileSystemArn: jsii.String("fileSystemArn"),

	// the properties below are optional
	AccessPointArn: jsii.String("accessPointArn"),
	RootDirectory: jsii.String("rootDirectory"),
	TransitEncryptionPort: jsii.Number(123),
}
```

## Properties

- `accessPointArn`: string — The full ARN of the S3 Files access point to use.

  If an access point is specified, the root directory value specified in the ``S3FilesVolumeConfiguration`` must either be omitted or set to ``/`` which will enforce the path set on the S3 Files access point. For more information, see [Creating S3 Files access points](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-access-points-creating.html).

- `fileSystemArn`: string (required) — The full ARN of the S3 Files file system to mount.

- `rootDirectory`: string — The directory within the Amazon S3 Files file system to mount as the root directory.

  If this parameter is omitted, the root of the Amazon S3 Files file system will be used. Specifying ``/`` will have the same effect as omitting this parameter.
    If a S3 Files access point is specified in the ``accessPointArn``, the root directory parameter must either be omitted or set to ``/`` which will enforce the path set on the S3 Files access point.

- `transitEncryptionPort`: number — The port to use for sending encrypted data between the ECS host and the S3 Files file system.

  If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon S3 Files mount helper uses. For more information, see [S3 Files mount helper](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-mounting.html).
