@aws-cdk_aws-batch-alpha.EfsVolumeOptions

interface EfsVolumeOptions ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.EfsVolumeOptions
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#EfsVolumeOptions
Javasoftware.amazon.awscdk.services.batch.alpha.EfsVolumeOptions
Pythonaws_cdk.aws_batch_alpha.EfsVolumeOptions
TypeScript (source)@aws-cdk/aws-batch-alpha ยป EfsVolumeOptions

Options for configuring an EfsVolume.

Example

import * as cdk from 'aws-cdk-lib';
import * as efs from 'aws-cdk-lib/aws-efs';

declare const myFileSystem: efs.IFileSystem;

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',
    })],
  }),
});

Properties

NameTypeDescription
containerPath๐Ÿ”นstringthe path on the container where this volume is mounted.
fileSystem๐Ÿ”นIFileSystemThe EFS File System that supports this volume.
name๐Ÿ”นstringthe name of this volume.
accessPointId?๐Ÿ”นstringThe Amazon EFS access point ID to use.
enableTransitEncryption?๐Ÿ”นbooleanEnables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.
readonly?๐Ÿ”นbooleanif set, the container will have readonly access to the volume.
rootDirectory?๐Ÿ”นstringThe directory within the Amazon EFS file system to mount as the root directory inside the host.
transitEncryptionPort?๐Ÿ”นnumberThe port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.
useJobRole?๐Ÿ”นbooleanWhether 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: IFileSystem

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.

See also: https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints