interface EfsVolumeOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Batch.EfsVolumeOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsbatch#EfsVolumeOptions |
![]() | software.amazon.awscdk.services.batch.EfsVolumeOptions |
![]() | aws_cdk.aws_batch.EfsVolumeOptions |
![]() | aws-cdk-lib » aws_batch » EfsVolumeOptions |
Options for configuring an EfsVolume.
Example
declare const myFileSystem: efs.IFileSystem;
declare const myJobRole: iam.Role;
myFileSystem.grantRead(myJobRole);
const jobDefn = new batch.EcsJobDefinition(this, 'JobDefn', {
container: new batch.EcsEc2ContainerDefinition(this, 'containerDefn', {
image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
memory: cdk.Size.mebibytes(2048),
cpu: 256,
volumes: [batch.EcsVolume.efs({
name: 'myVolume',
fileSystem: myFileSystem,
containerPath: '/Volumes/myVolume',
useJobRole: true,
})],
jobRole: myJobRole,
}),
});
Properties
Name | Type | Description |
---|---|---|
container | string | the path on the container where this volume is mounted. |
file | IFile | The EFS File System that supports this volume. |
name | string | the name of this volume. |
access | string | The Amazon EFS access point ID to use. |
enable | boolean | Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. |
readonly? | boolean | if set, the container will have readonly access to the volume. |
root | string | The directory within the Amazon EFS file system to mount as the root directory inside the host. |
transit | number | The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server. |
use | boolean | Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system. |
containerPath
Type:
string
the path on the container where this volume is mounted.
fileSystem
Type:
IFile
The EFS File System that supports this volume.
name
Type:
string
the name of this volume.
accessPointId?
Type:
string
(optional, default: no accessPointId)
The Amazon EFS access point ID to use.
If an access point is specified, rootDirectory
must either be omitted or set to /
which enforces the path set on the EFS access point.
If an access point is used, enableTransitEncryption
must be true
.
See also: https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html
enableTransitEncryption?
Type:
boolean
(optional, default: false)
Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.
See also: https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html
readonly?
Type:
boolean
(optional, default: false)
if set, the container will have readonly access to the volume.
rootDirectory?
Type:
string
(optional, default: root of the EFS File System)
The directory within the Amazon EFS file system to mount as the root directory inside the host.
If this parameter is omitted, the root of the Amazon EFS volume is used instead.
Specifying /
has the same effect as omitting this parameter.
The maximum length is 4,096 characters.
transitEncryptionPort?
Type:
number
(optional, default: chosen by the EFS Mount Helper)
The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.
The value must be between 0 and 65,535.
See also: https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html
useJobRole?
Type:
boolean
(optional, default: false)
Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.
If specified, enableTransitEncryption
must be true
.