Skip to content
v2.274.0

EmptyDirVolumeOptions Struct ​

Options for a Kubernetes EmptyDir volume.

Example ​

ts
const jobDefn = new batch.EksJobDefinition(this, 'eksf2', {
  container: new batch.EksContainerDefinition(this, 'container', {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
    volumes: [batch.EksVolume.emptyDir({
      name: 'myEmptyDirVolume',
      mountPath: '/mount/path',
      medium: batch.EmptyDirMediumType.MEMORY,
      readonly: true,
      sizeLimit: cdk.Size.mebibytes(2048),
    })],
  }),
});

Properties ​

The storage type to use for this Volume.
mountPathstringmount_pathstrmountPathStringMountPathstringMountPath*string= the volume is not mounted#
The path on the container where the volume is mounted.
namestringnamestrnameStringNamestringName*stringrequired#
The name of this volume.

The name must be a valid DNS subdomain name.

readonlybooleanreadonlyboolreadonlyBooleanReadonlyboolReadonly*bool= false#
If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.

sizeLimitSizesize_limitSizesizeLimitSizeSizeLimitSizeSizeLimitSize= no size limit#
The maximum size for this Volume.