# AWS Batch Construct Library

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

AWS Batch is a batch processing tool for efficiently running hundreds of thousands computing jobs in AWS.
Batch can dynamically provision [Amazon EC2](https://aws.amazon.com/ec2/) Instances to meet the resource requirements of submitted jobs
and simplifies the planning, scheduling, and executions of your batch workloads. Batch achieves this through four different resources:

* ComputeEnvironments: Contain the resources used to execute Jobs
* JobDefinitions: Define a type of Job that can be submitted
* JobQueues: Route waiting Jobs to ComputeEnvironments
* SchedulingPolicies: Applied to Queues to control how and when Jobs exit the JobQueue and enter the ComputeEnvironment

`ComputeEnvironment`s can be managed or unmanaged. Batch will automatically provision EC2 Instances in a managed `ComputeEnvironment` and will
not provision any Instances in an unmanaged `ComputeEnvironment`. Managed `ComputeEnvironment`s can use ECS, Fargate, or EKS resources to spin up
EC2 Instances in (ensure your EKS Cluster has [been configured](https://docs.aws.amazon.com/batch/latest/userguide/getting-started-eks.html)
to support a Batch ComputeEnvironment before linking it). You can use Launch Templates and Placement Groups to configure exactly how these resources
will be provisioned.

`JobDefinition`s can use either ECS resources or EKS resources. ECS `JobDefinition`s can use multiple containers to execute distributed workloads.
EKS `JobDefinition`s can only execute a single container. Submitted Jobs use `JobDefinition`s as templates.

`JobQueue`s must link at least one `ComputeEnvironment`. Jobs exit the Queue in FIFO order unless a `SchedulingPolicy` is specified.

`SchedulingPolicy`s tell the Scheduler how to choose which Jobs should be executed next by the ComputeEnvironment.

## Use Cases & Examples

### Cost Optimization

#### Spot Instances

Spot instances are significantly discounted EC2 instances that can be reclaimed at any time by AWS.
Workloads that are fault-tolerant or stateless can take advantage of spot pricing.
To use spot spot instances, set `spot` to `true` on a managed Ec2 or Fargate Compute Environment:

```ts
const vpc = new ec2.Vpc(this, 'VPC');
new batch.FargateComputeEnvironment(this, 'myFargateComputeEnv', {
  vpc,
  spot: true,
});
```

Batch allows you to specify the percentage of the on-demand instance that the current spot price
must be to provision the instance using the `spotBidPercentage`.
This defaults to 100%, which is the recommended value.
This value cannot be specified for `FargateComputeEnvironment`s
and only applies to `ManagedEc2EcsComputeEnvironment`s.
The following code configures a Compute Environment to only use spot instances that
are at most 20% the price of the on-demand instance price:

_Note_: For `FargateComputeEnvironment`, while the `FargateComputeEnvironmentProps` interface includes properties like `replaceComputeEnvironment`, `terminateOnUpdate`, `updateTimeout`, and `updateToLatestImageVersion`, these specific properties are **not applicable** when configuring AWS Batch Fargate compute environments. They primarily apply to EC2-based compute environments. Please refer to the official [AWS Batch UpdateComputeEnvironment API documentation](https://docs.aws.amazon.com/batch/latest/APIReference/API_UpdateComputeEnvironment.html) and [User Guide](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) for details on updating Fargate compute environments.

```ts
const vpc = new ec2.Vpc(this, 'VPC');
new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
   vpc,
   spot: true,
   spotBidPercentage: 20,
});
```

For stateful or otherwise non-interruption-tolerant workflows, omit `spot` or set it to `false` to only provision on-demand instances.

#### Choosing Your Instance Types

There are several ways to configure instance types for your compute environment:

##### Using Default Instance Classes (Recommended)

AWS Batch provides default instance classes that automatically select cost-effective, up-to-date instances based on your region.
This is the recommended approach for new projects:

```ts
const vpc = new ec2.Vpc(this, 'Vpc');

// Use ARM64 instances (e.g., m6g, c6g, r6g, c7g families)
new batch.ManagedEc2EcsComputeEnvironment(this, 'Arm64Ec2ComputeEnv', {
  vpc,
  defaultInstanceClasses: [batch.DefaultInstanceClass.ARM64],
});

// Use x86_64 instances (e.g., m6i, c6i, r6i, c7i families)
new batch.ManagedEc2EcsComputeEnvironment(this, 'X86_64Ec2ComputeEnv', {
  vpc,
  defaultInstanceClasses: [batch.DefaultInstanceClass.X86_64],
});
```

The `default_x86_64` and `default_arm64` categories are dynamically updated by AWS as new instance families become available in your region.

##### Using Specific Instance Types Only

To use only specific instance types without any automatic defaults, set `useOptimalInstanceClasses: false`:

```ts
const vpc = new ec2.Vpc(this, 'Vpc');

// Use only R4 instance class (Batch chooses the size)
new batch.ManagedEc2EcsComputeEnvironment(this, 'R4Ec2ComputeEnv', {
  vpc,
  useOptimalInstanceClasses: false,
  instanceClasses: [ec2.InstanceClass.R4],
});

// Use only a specific instance type
new batch.ManagedEc2EcsComputeEnvironment(this, 'M5AdLargeEc2ComputeEnv', {
  vpc,
  useOptimalInstanceClasses: false,
  instanceTypes: [ec2.InstanceType.of(ec2.InstanceClass.M5AD, ec2.InstanceSize.LARGE)],
});
```

##### Using Optimal Instance Classes

By default, `useOptimalInstanceClasses` is `true`, which adds the `optimal` instance type.

**Note**: Since November 2025, `optimal` behaves the same as `default_x86_64` and is dynamically updated as AWS introduces new instance families. Both options automatically select cost-effective x86_64 instance types (from the m6i, c6i, r6i, and c7i families) based on your region.

You can combine this with additional instance types:

```ts
declare const vpc: ec2.IVpc;

const computeEnv = new batch.ManagedEc2EcsComputeEnvironment(this, 'Ec2ComputeEnv', {
  vpc,
  instanceTypes: [ec2.InstanceType.of(ec2.InstanceClass.M5AD, ec2.InstanceSize.LARGE)],
  // useOptimalInstanceClasses: true (default)
});
// Result: ['m5ad.large', 'optimal']
```

##### Instance Type Configuration Reference

| Goal | Configuration |
|------|---------------|
| Use latest x86_64 instances | `defaultInstanceClasses: [DefaultInstanceClass.X86_64]` or no configuration (default) |
| Use latest ARM64 instances | `defaultInstanceClasses: [DefaultInstanceClass.ARM64]` |
| Use only specific instance classes | `useOptimalInstanceClasses: false` + `instanceClasses: [...]` |
| Use only specific instance types | `useOptimalInstanceClasses: false` + `instanceTypes: [...]` |
| Use optimal + additional instances | `instanceClasses: [...]` or `instanceTypes: [...]` |

**Note**: Batch does not allow specifying instance types or classes with different architectures.
For example, `InstanceClass.A1` (ARM) cannot be specified alongside `optimal` (x86_64).
When using ARM-based instances (e.g., Graviton), use `defaultInstanceClasses: [DefaultInstanceClass.ARM64]`, or set `useOptimalInstanceClasses: false` and explicitly specify ARM instance classes/types.

**Note**: `useOptimalInstanceClasses` and `defaultInstanceClasses` cannot be used together.

#### Configure AMIs

You can configure Amazon Machine Images (AMIs). This example configures your `ComputeEnvironment` to use Amazon Linux 2023.

```ts
declare const vpc: ec2.IVpc;

new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
  vpc,
  images: [
    {
      imageType: batch.EcsMachineImageType.ECS_AL2023,
    },
  ],
});
```

If your image needs GPU resources, specify `ECS_AL2023_NVIDIA`:

```ts
declare const vpc: ec2.IVpc;

new batch.ManagedEc2EcsComputeEnvironment(this, 'myGpuComputeEnv', {
  vpc,
  images: [
    {
      imageType: batch.EcsMachineImageType.ECS_AL2023_NVIDIA,
    },
  ],
});
```

#### Allocation Strategies

| Allocation Strategy           | Optimized for              | Downsides                     |
| -----------------------       | -------------              | ----------------------------- |
| BEST_FIT                      | Cost                       | May limit throughput          |
| BEST_FIT_PROGRESSIVE          | Throughput                 | May increase cost             |
| SPOT_CAPACITY_OPTIMIZED       | Least interruption         | Only useful on Spot instances |
| SPOT_PRICE_CAPACITY_OPTIMIZED | Least interruption + Price | Only useful on Spot instances |

Batch provides different Allocation Strategies to help it choose which instances to provision.
If your workflow tolerates interruptions, you should enable `spot` on your `ComputeEnvironment`
and use `SPOT_PRICE_CAPACITY_OPTIMIZED` (this is the default if `spot` is enabled).
This will tell Batch to choose the instance types from the ones you’ve specified that have
the most spot capacity available to minimize the chance of interruption and have the lowest price.
To get the most benefit from your spot instances,
you should allow Batch to choose from as many different instance types as possible.
If you only care about minimal interruptions and not want Batch to optimize for cost, use
`SPOT_CAPACITY_OPTIMIZED`. `SPOT_PRICE_CAPACITY_OPTIMIZED` is recommended over `SPOT_CAPACITY_OPTIMIZED`
for most use cases.

If your workflow does not tolerate interruptions and you want to minimize your costs at the expense
of potentially longer waiting times, use `AllocationStrategy.BEST_FIT`.
This will choose the lowest-cost instance type that fits all the jobs in the queue.
If instances of that type are not available,
the queue will not choose a new type; instead, it will wait for the instance to become available.
This can stall your `Queue`, with your compute environment only using part of its max capacity
(or none at all) until the `BEST_FIT` instance becomes available.

If you are running a workflow that does not tolerate interruptions and you want to maximize throughput,
you can use `AllocationStrategy.BEST_FIT_PROGRESSIVE`.
This is the default Allocation Strategy if `spot` is `false` or unspecified.
This strategy will examine the Jobs in the queue and choose whichever instance type meets the requirements
of the jobs in the queue and with the lowest cost per vCPU, just as `BEST_FIT`.
However, if not all of the capacity can be filled with this instance type,
it will choose a new next-best instance type to run any jobs that couldn’t fit into the `BEST_FIT` capacity.
To make the most use of this allocation strategy,
it is recommended to use as many instance classes as is feasible for your workload.
This example shows a `ComputeEnvironment` that uses `BEST_FIT_PROGRESSIVE`
with `'optimal'` and `InstanceClass.M5` instance types:

```ts
declare const vpc: ec2.IVpc;

const computeEnv = new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
  vpc,
  instanceClasses: [ec2.InstanceClass.M5],
});
```

This example shows a `ComputeEnvironment` that uses `BEST_FIT` with `'optimal'` instances:

```ts
declare const vpc: ec2.IVpc;

const computeEnv = new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
  vpc,
  allocationStrategy: batch.AllocationStrategy.BEST_FIT,
});
```

*Note*: `allocationStrategy` cannot be specified on Fargate Compute Environments.

### Controlling vCPU allocation

You can specify the maximum and minimum vCPUs a managed `ComputeEnvironment` can have at any given time.
Batch will *always* maintain `minvCpus` worth of instances in your ComputeEnvironment, even if it is not executing any jobs,
and even if it is disabled. Batch will scale the instances up to `maxvCpus` worth of instances as
jobs exit the JobQueue and enter the ComputeEnvironment. If you use `AllocationStrategy.BEST_FIT_PROGRESSIVE`,
`AllocationStrategy.SPOT_PRICE_CAPACITY_OPTIMIZED`, or `AllocationStrategy.SPOT_CAPACITY_OPTIMIZED`,
batch may exceed `maxvCpus`; it will never exceed `maxvCpus` by more than a single instance type. This example configures a
`minvCpus` of 10 and a `maxvCpus` of 100:

```ts
declare const vpc: ec2.IVpc;

new batch.ManagedEc2EcsComputeEnvironment(this, 'myEc2ComputeEnv', {
  vpc,
  instanceClasses: [ec2.InstanceClass.R4],
  minvCpus: 10,
  maxvCpus: 100,
});
```

### Tagging Instances

You can tag any instances launched by your managed EC2 ComputeEnvironments by using the CDK `Tags` API:

```ts
declare const vpc: ec2.IVpc;

const tagCE = new batch.ManagedEc2EcsComputeEnvironment(this, 'CEThatMakesTaggedInstnaces', {
  vpc,
});

Tags.of(tagCE).add('super', 'salamander');
```

Unmanaged `ComputeEnvironment`s do not support `maxvCpus` or `minvCpus` because you must provision and manage the instances yourself;
that is, Batch will not scale them up and down as needed.

### Sharing a ComputeEnvironment between multiple JobQueues

Multiple `JobQueue`s can share the same `ComputeEnvironment`.
If multiple Queues are attempting to submit Jobs to the same `ComputeEnvironment`,
Batch will pick the Job from the Queue with the highest priority.
This example creates two `JobQueue`s that share a `ComputeEnvironment`:

```ts
declare const vpc: ec2.IVpc;
const sharedComputeEnv = new batch.FargateComputeEnvironment(this, 'spotEnv', {
  vpc,
  spot: true,
});
const lowPriorityQueue = new batch.JobQueue(this, 'JobQueue', {
   priority: 1,
});
const highPriorityQueue = new batch.JobQueue(this, 'JobQueue', {
   priority: 10,
});
lowPriorityQueue.addComputeEnvironment(sharedComputeEnv, 1);
highPriorityQueue.addComputeEnvironment(sharedComputeEnv, 1);
```

### React to jobs stuck in RUNNABLE state

You can react to jobs stuck in RUNNABLE state by setting a `jobStateTimeLimitActions` in `JobQueue`.
Specifies actions that AWS Batch will take after the job has remained at the head of the queue in the
specified state for longer than the specified time.

```ts
new batch.JobQueue(this, 'JobQueue', {
    jobStateTimeLimitActions: [
      {
        action: batch.JobStateTimeLimitActionsAction.CANCEL,
        maxTime: cdk.Duration.minutes(10),
        reason: batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
        state: batch.JobStateTimeLimitActionsState.RUNNABLE,
      },
    ]
});
```

### Fairshare Scheduling

Batch `JobQueue`s execute Jobs submitted to them in FIFO order unless you specify a `SchedulingPolicy`.
FIFO queuing can cause short-running jobs to be starved while long-running jobs fill the compute environment.
To solve this, Jobs can be associated with a share.

Shares consist of a `shareIdentifier` and a `weightFactor`, which is inversely correlated with the vCPU allocated to that share identifier.
When submitting a Job, you can specify its `shareIdentifier` to associate that particular job with that share.
Let's see how the scheduler uses this information to schedule jobs.

For example, if there are two shares defined as follows:

| Share Identifier | Weight Factor |
| ---------------- | ------------- |
| A                | 1             |
| B                | 1             |

The weight factors share the following relationship:

$$
A_{vCpus} / A_{Weight} = B_{vCpus} / B_{Weight}
$$

where `BvCpus` is the number of vCPUs allocated to jobs with share identifier `'B'`, and `B_weight` is the weight factor of `B`.

The total number of vCpus allocated to a share is equal to the amount of jobs in that share times the number of vCpus necessary for every job.
Let's say that each A job needs 32 VCpus (`A_requirement` = 32) and each B job needs 64 vCpus (`B_requirement` = 64):

$$
A_{vCpus} = A_{Jobs} * A_{Requirement}
$$

$$
B_{vCpus} = B_{Jobs} * B_{Requirement}
$$

We have:

$$
A_{vCpus} / A_{Weight} = B_{vCpus} / B_{Weight}
$$

$$
A_{Jobs} * A_{Requirement} / A_{Weight} = B_{Jobs} * B_{Requirement} / B_{Weight}
$$

$$
A_{Jobs} * 32 / 1 = B_{Jobs} * 64 / 1
$$

$$
A_{Jobs} * 32 = B_{Jobs} * 64
$$

$$
A_{Jobs} = B_{Jobs} * 2
$$

Thus the scheduler will schedule two `'A'` jobs for each `'B'` job.

You can control the weight factors to change these ratios, but note that
weight factors are inversely correlated with the vCpus allocated to the corresponding share.

This example would be configured like this:

```ts
const fairsharePolicy = new batch.FairshareSchedulingPolicy(this, 'myFairsharePolicy');

fairsharePolicy.addShare({
  shareIdentifier: 'A',
  weightFactor: 1,
});
fairsharePolicy.addShare({
  shareIdentifier: 'B',
  weightFactor: 1,
});
new batch.JobQueue(this, 'JobQueue', {
  schedulingPolicy: fairsharePolicy,
});
```

*Note*: The scheduler will only consider the current usage of the compute environment unless you specify `shareDecay`.
For example, a `shareDecay` of 5 minutes in the above example means that at any given point in time, twice as many `'A'` jobs
will be scheduled for each `'B'` job, but only for the past 5 minutes. If `'B'` jobs run longer than 5 minutes, then
the scheduler is allowed to put more than two `'A'` jobs for each `'B'` job, because the usage of those long-running
`'B'` jobs will no longer be considered after 5 minutes. `shareDecay` linearly decreases the usage of
long running jobs for calculation purposes. For example if share decay is 60 seconds,
then jobs that run for 30 seconds have their usage considered to be only 50% of what it actually is,
but after a whole minute the scheduler pretends they don't exist for fairness calculations.

The following code specifies a `shareDecay` of 5 minutes:

```ts
const fairsharePolicy = new batch.FairshareSchedulingPolicy(this, 'myFairsharePolicy', {
   shareDecay: cdk.Duration.minutes(5),
});
```

If you have high priority jobs that should always be executed as soon as they arrive,
you can define a `computeReservation` to specify the percentage of the
maximum vCPU capacity that should be reserved for shares that are *not in the queue*.
The actual reserved percentage is defined by Batch as:

$$
 (\frac{computeReservation}{100}) ^ {ActiveFairShares}
$$

where `ActiveFairShares` is the number of shares for which there exists
at least one job in the queue with a unique share identifier.

This is best illustrated with an example.
Suppose there are three shares with share identifiers `A`, `B` and `C` respectively
and we specify the `computeReservation` to be 75%. The queue is currently empty,
and no other shares exist.

There are no active fair shares, since the queue is empty.
Thus (75/100)^0 = 1 = 100% of the maximum vCpus are reserved for all shares.

A job with identifier `A` enters the queue.

The number of active fair shares is now 1, hence
(75/100)^1 = .75 = 75% of the maximum vCpus are reserved for all shares that do not have the identifier `A`;
for this example, this is `B` and `C`,
(but if jobs are submitted with a share identifier not covered by this fairshare policy, those would be considered just as `B` and `C` are).

Now a `B` job enters the queue. The number of active fair shares is now 2,
so (75/100)^2 = .5625 = 56.25% of the maximum vCpus are reserved for all shares that do not have the identifier `A` or `B`.

Now a second `A` job enters the queue. The number of active fair shares is still 2,
so the percentage reserved is still 56.25%

Now a `C` job enters the queue. The number of active fair shares is now 3,
so (75/100)^3 = .421875 = 42.1875% of the maximum vCpus are reserved for all shares that do not have the identifier `A`, `B`, or `C`.

If there are no other shares that your jobs can specify, this means that 42.1875% of your capacity will never be used!

Now, `A`, `B`, and `C` can only consume 100% - 42.1875% = 57.8125% of the maximum vCpus.
Note that the this percentage is **not** split between `A`, `B`, and `C`.
Instead, the scheduler will use their `weightFactor`s to decide which jobs to schedule;
the only difference is that instead of competing for 100% of the max capacity, jobs compete for 57.8125% of the max capacity.

This example specifies a `computeReservation` of 75% that will behave as explained in the example above:

```ts
new batch.FairshareSchedulingPolicy(this, 'myFairsharePolicy', {
  computeReservation: 75,
  shares: [
    { weightFactor: 1, shareIdentifier: 'A' },
    { weightFactor: 0.5, shareIdentifier: 'B' },
    { weightFactor: 2, shareIdentifier: 'C' },
  ],
});
```

You can specify a `priority` on your `JobDefinition`s to tell the scheduler to prioritize certain jobs that share the same share identifier.

### Configuring Job Retry Policies

Certain workflows may result in Jobs failing due to intermittent issues.
Jobs can specify retry policies to respond to different failures with different actions.
There are three different ways information about the way a Job exited can be conveyed;

* `exitCode`: the exit code returned from the process executed by the container. Will only match non-zero exit codes.
* `reason`: any middleware errors, like your Docker registry being down.
* `statusReason`: infrastructure errors, most commonly your spot instance being reclaimed.

For most use cases, only one of these will be associated with a particular action at a time.
To specify common `exitCode`s, `reason`s, or `statusReason`s, use the corresponding value from
the `Reason` class. This example shows some common failure reasons:

```ts
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,
  }),
  retryAttempts: 5,
  retryStrategies: [
    batch.RetryStrategy.of(batch.Action.EXIT, batch.Reason.CANNOT_PULL_CONTAINER),
  ],
});
jobDefn.addRetryStrategy(
  batch.RetryStrategy.of(batch.Action.EXIT, batch.Reason.SPOT_INSTANCE_RECLAIMED),
);
jobDefn.addRetryStrategy(
  batch.RetryStrategy.of(batch.Action.EXIT, batch.Reason.CANNOT_PULL_CONTAINER),
);
jobDefn.addRetryStrategy(
  batch.RetryStrategy.of(batch.Action.EXIT, batch.Reason.custom({
    onExitCode: '40*',
    onReason: 'some reason',
  })),
);
```

When specifying a custom reason,
you can specify a glob string to match each of these and react to different failures accordingly.
Up to five different retry strategies can be configured for each Job,
and each strategy can match against some or all of `exitCode`, `reason`, and `statusReason`.
You can optionally configure the number of times a job will be retried,
but you cannot configure different retry counts for different strategies; they all share the same count.
If multiple conditions are specified in a given retry strategy,
they must all match for the action to be taken; the conditions are ANDed together, not ORed.

### Running single-container ECS workflows

Batch can run jobs on ECS or EKS. ECS jobs can be defined as single container or multinode.
This example creates a `JobDefinition` that runs a single container with ECS:

```ts
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,
  }),
});
```

For workflows that need persistent storage, batch supports mounting `Volume`s to the container.
You can both provision the volume and mount it to the container in a single operation:

```ts
declare const myFileSystem: efs.IFileSystem;
declare const jobDefn: batch.EcsJobDefinition;

jobDefn.container.addVolume(batch.EcsVolume.efs({
  name: 'myVolume',
  fileSystem: myFileSystem,
  containerPath: '/Volumes/myVolume',
}));
```

### Running an ECS workflow with Fargate container

```ts
const jobDefn = new batch.EcsJobDefinition(this, 'JobDefn', {
  container: new batch.EcsFargateContainerDefinition(this, 'myFargateContainer', {
    image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
    memory: cdk.Size.mebibytes(2048),
    cpu: 256,
    ephemeralStorageSize: cdk.Size.gibibytes(100),
    fargateCpuArchitecture: ecs.CpuArchitecture.ARM64,
    fargateOperatingSystemFamily: ecs.OperatingSystemFamily.LINUX,
  }),
});
```

### Enable Execute Command (ECS Exec)

You can enable [ECS Exec](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) for interactive debugging and troubleshooting by setting `enableExecuteCommand` to `true`.
When enabled, you'll be able to execute commands interactively in running containers.

```ts
const jobDefn = new batch.EcsJobDefinition(this, 'JobDefn', {
  container: new batch.EcsEc2ContainerDefinition(this, 'Ec2Container', {
    image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
    memory: cdk.Size.mebibytes(2048),
    cpu: 256,
    enableExecuteCommand: true, // Enable ECS Exec
  }),
});
```

The same functionality is available for Fargate containers:

```ts
const jobDefn = new batch.EcsJobDefinition(this, 'JobDefn', {
  container: new batch.EcsFargateContainerDefinition(this, 'FargateContainer', {
    image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
    memory: cdk.Size.mebibytes(2048),
    cpu: 256,
    enableExecuteCommand: true, // Enable ECS Exec for Fargate
  }),
});
```

When `enableExecuteCommand` is set to `true`:

- If no `jobRole` is provided, a new IAM role will be automatically created with the required SSM permissions
- If a `jobRole` is already provided, the necessary SSM permissions will be added to the existing role

### Secrets

You can expose SecretsManager Secret ARNs or SSM Parameters to your container as environment variables.
The following example defines the `MY_SECRET_ENV_VAR` environment variable that contains the
ARN of the Secret defined by `mySecret`:

```ts
declare const mySecret: secretsmanager.ISecret;

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,
    secrets: {
      MY_SECRET_ENV_VAR: batch.Secret.fromSecretsManager(mySecret),
    }
  }),
});
```

### Running Kubernetes Workflows

Batch also supports running workflows on EKS. The following example creates a `JobDefinition` that runs on EKS:

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

You can mount `Volume`s to these containers in a single operation:

```ts
declare const jobDefn: batch.EksJobDefinition;
jobDefn.container.addVolume(batch.EksVolume.emptyDir({
  name: 'emptyDir',
  mountPath: '/Volumes/emptyDir',
}));
jobDefn.container.addVolume(batch.EksVolume.hostPath({
  name: 'hostPath',
  hostPath: '/sys',
  mountPath: '/Volumes/hostPath',
}));
jobDefn.container.addVolume(batch.EksVolume.secret({
  name: 'secret',
  optional: true,
  mountPath: '/Volumes/secret',
  secretName: 'mySecret',
}));
```

### Running Distributed Workflows

Some workflows benefit from parallellization and are most powerful when run in a distributed environment,
such as certain numerical calculations or simulations. Batch offers `MultiNodeJobDefinition`s,
which allow a single job to run on multiple instances in parallel, for this purpose.
Message Passing Interface (MPI) is often used with these workflows.
You must configure your containers to use MPI properly,
but Batch allows different nodes running different containers to communicate easily with one another.
You must configure your containers to use certain environment variables that Batch will provide them,
which lets them know which one is the main node, among other information.
For an in-depth example on using MPI to perform numerical computations on Batch,
see this [blog post](https://aws.amazon.com/blogs/compute/building-a-tightly-coupled-molecular-dynamics-workflow-with-multi-node-parallel-jobs-in-aws-batch/)
In particular, the environment variable that tells the containers which one is the main node can be configured on your `MultiNodeJobDefinition` as follows:

```ts
const multiNodeJob = new batch.MultiNodeJobDefinition(this, 'JobDefinition', {
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.R4, ec2.InstanceSize.LARGE), // optional, omit to let Batch choose the type for you
  containers: [{
    container: new batch.EcsEc2ContainerDefinition(this, 'mainMPIContainer', {
      image: ecs.ContainerImage.fromRegistry('yourregsitry.com/yourMPIImage:latest'),
      cpu: 256,
      memory: cdk.Size.mebibytes(2048),
    }),
    startNode: 0,
    endNode: 5,
  }],
});
// convenience method
multiNodeJob.addContainer({
  startNode: 6,
  endNode: 10,
  container: new batch.EcsEc2ContainerDefinition(this, 'multiContainer', {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
    cpu: 256,
    memory: cdk.Size.mebibytes(2048),
  }),
});
```

If you need to set the control node to an index other than 0, specify it in directly:

```ts
const multiNodeJob = new batch.MultiNodeJobDefinition(this, 'JobDefinition', {
  mainNode: 5,
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.R4, ec2.InstanceSize.LARGE),
});
```

### Pass Parameters to a Job

Batch allows you define parameters in your `JobDefinition`, which can be referenced in the container command. For example:

```ts
new batch.EcsJobDefinition(this, 'JobDefn', {
  parameters: { echoParam: 'foobar' },
  container: new batch.EcsEc2ContainerDefinition(this, 'containerDefn', {
    image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
    memory: cdk.Size.mebibytes(2048),
    cpu: 256,
    command: [
      'echo',
      'Ref::echoParam',
    ],
  }),
});
```

### Job Definition Version Management

By default, when you update a Job Definition, AWS Batch automatically deregisters the previous revision.
This means any jobs that were submitted using the old revision may fail if they haven't started yet.

You can preserve previous revisions by setting `skipDeregisterOnUpdate` to `true`:

```ts
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,
  }),
  skipDeregisterOnUpdate: true,  // Keep previous revisions active
});
```

* This applies to all Job Definition types: ECS (EC2 and Fargate), EKS, and MultiNode
* Default behavior (when not specified) follows AWS Batch defaults: previous revisions are deregistered

### Understanding Progressive Allocation Strategies

AWS Batch uses an [allocation strategy](https://docs.aws.amazon.com/batch/latest/userguide/allocation-strategies.html) to determine what compute resource will efficiently handle incoming job requests. By default, **BEST_FIT** will pick an available compute instance based on vCPU requirements. If none exist, the job will wait until resources become available. However, with this strategy, you may have jobs waiting in the queue unnecessarily despite having more powerful instances available. Below is an example of how that situation might look like:

```plaintext
Compute Environment:

1. m5.xlarge => 4 vCPU
2. m5.2xlarge => 8 vCPU
```

```plaintext
Job Queue:
---------
| A | B |
---------

Job Requirements:
A => 4 vCPU - ALLOCATED TO m5.xlarge
B => 2 vCPU - WAITING
```

In this situation, Batch will allocate **Job A** to compute resource #1 because it is the most cost efficient resource that matches the vCPU requirement. However, with this `BEST_FIT` strategy, **Job B** will not be allocated to our other available compute resource even though it is strong enough to handle it. Instead, it will wait until the first job is finished processing or wait a similar `m5.xlarge` resource to be provisioned.

The alternative would be to use the `BEST_FIT_PROGRESSIVE` strategy in order for the remaining job to be handled in larger containers regardless of vCPU requirement and costs.

### Permissions

You can grant any Principal the `batch:submitJob` permission on both a job definition and a job queue like this:

```ts
declare const vpc: ec2.IVpc;

const ecsJob = 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,
  }),
});

const queue = new batch.JobQueue(this, 'JobQueue', {
  computeEnvironments: [{
    computeEnvironment: new batch.ManagedEc2EcsComputeEnvironment(this, 'managedEc2CE', {
      vpc,
    }),
    order: 1,
  }],
  priority: 10,
});

const user = new iam.User(this, 'MyUser');
ecsJob.grantSubmitJob(user, queue);
```

### Managing Consumable Resources

Consumable resources are finite resources that are consumed by jobs, such as third-party software licenses or API rate limits. AWS Batch tracks the usage of these resources and ensures that jobs only run when the required resources are available.

There are two types of consumable resources:

* **REPLENISHABLE**: Resources that can be re-used after a job completes (e.g., software licenses)
* **NON_REPLENISHABLE**: Resources that cannot be re-used after a job completes (e.g., API rate limits)

#### Creating Consumable Resources

You can create consumable resources to track and manage finite resources in your Batch workflows:

```ts
// Create a replenishable consumable resource (e.g., software licenses)
const licenseResource = new batch.ConsumableResource(this, 'LicenseResource', {
  consumableResourceName: 'my-software-license',
  resourceType: batch.ConsumableResourceType.REPLENISHABLE,
  totalQuantity: 100,
});

// Create a non-replenishable consumable resource (e.g., API rate limits)
const apiRateLimitResource = new batch.ConsumableResource(this, 'ApiRateLimitResource', {
  consumableResourceName: 'api-rate-limit',
  resourceType: batch.ConsumableResourceType.NON_REPLENISHABLE,
  totalQuantity: 1000,
});
```

`resourceType` defaults to `REPLENISHABLE`, matching the AWS Batch API, and `totalQuantity` must be
a non-negative integer. Both `consumableResourceName` and `resourceType` replace the resource when
changed, so changing the type of a resource that has an explicit name also requires a new name.

Tags can be passed directly to the resource:

```ts
const taggedResource = new batch.ConsumableResource(this, 'TaggedResource', {
  totalQuantity: 100,
  tags: {
    Team: 'batch',
  },
});
```

#### Granting Access to Consumable Resources

Use the `grants` property to give an identity permission to inspect or update a consumable resource:

```ts
const licenseResource = new batch.ConsumableResource(this, 'LicenseResource', {
  totalQuantity: 100,
});

const user = new iam.User(this, 'MyUser');

// Describe the resource and list the jobs that use it
licenseResource.grants.read(user);

// Change the total quantity, e.g. to replenish a NON_REPLENISHABLE pool
licenseResource.grants.update(user);
```

#### Importing Existing Consumable Resources

You can import existing consumable resources by their ARN:

```ts
const importedResource = batch.ConsumableResource.fromConsumableResourceArn(
  this,
  'ImportedResource',
  'arn:aws:batch:us-east-1:123456789012:consumable-resource/my-resource'
);
```

## Types

| Name | Kind | Summary |
| --- | --- | --- |
| [`ConsumableResource`](/v2/docs/aws-cdk-lib.aws_batch.ConsumableResource) | Construct (L2) | A Batch Consumable Resource. |
| [`EcsJobDefinition`](/v2/docs/aws-cdk-lib.aws_batch.EcsJobDefinition) | Construct (L2) | A JobDefinition that uses ECS orchestration. |
| [`EksJobDefinition`](/v2/docs/aws-cdk-lib.aws_batch.EksJobDefinition) | Construct (L2) | A JobDefinition that uses Eks orchestration. |
| [`FairshareSchedulingPolicy`](/v2/docs/aws-cdk-lib.aws_batch.FairshareSchedulingPolicy) | Construct (L2) | Represents a Fairshare Scheduling Policy. Instructs the scheduler to allocate ComputeEnvironment vCPUs based on Job shareIdentifiers. |
| [`FargateComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.FargateComputeEnvironment) | Construct (L2) | A ManagedComputeEnvironment that uses ECS orchestration on Fargate instances. |
| [`JobQueue`](/v2/docs/aws-cdk-lib.aws_batch.JobQueue) | Construct (L2) | JobQueues can receive Jobs, which are removed from the queue when sent to the linked ComputeEnvironment(s) to be executed. |
| [`ManagedEc2EcsComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.ManagedEc2EcsComputeEnvironment) | Construct (L2) | A ManagedComputeEnvironment that uses ECS orchestration on EC2 instances. |
| [`ManagedEc2EksComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.ManagedEc2EksComputeEnvironment) | Construct (L2) | A ManagedComputeEnvironment that uses ECS orchestration on EC2 instances. |
| [`MultiNodeJobDefinition`](/v2/docs/aws-cdk-lib.aws_batch.MultiNodeJobDefinition) | Construct (L2) | A JobDefinition that uses Ecs orchestration to run multiple containers. |
| [`UnmanagedComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.UnmanagedComputeEnvironment) | Construct (L2) | Unmanaged ComputeEnvironments do not provision or manage EC2 instances on your behalf. |
| [`CfnComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment) | Construct (L1) | The `AWS::Batch::ComputeEnvironment` resource defines your AWS Batch compute environment. |
| [`CfnConsumableResource`](/v2/docs/aws-cdk-lib.aws_batch.CfnConsumableResource) | Construct (L1) | The `AWS::Batch::ConsumableResource` resource specifies the parameters for an AWS Batch consumable resource. |
| [`CfnJobDefinition`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition) | Construct (L1) | The `AWS::Batch::JobDefinition` resource specifies the parameters for an AWS Batch job definition. |
| [`CfnJobQueue`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobQueue) | Construct (L1) | The `AWS::Batch::JobQueue` resource specifies the parameters for an AWS Batch job queue definition. |
| [`CfnQuotaShare`](/v2/docs/aws-cdk-lib.aws_batch.CfnQuotaShare) | Construct (L1) | Creates an AWS Batch quota share. |
| [`CfnSchedulingPolicy`](/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy) | Construct (L1) | The `AWS::Batch::SchedulingPolicy` resource specifies the parameters for an AWS Batch scheduling policy. |
| [`CfnServiceEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.CfnServiceEnvironment) | Construct (L1) | Creates a service environment for running service jobs. |
| [`Action`](/v2/docs/aws-cdk-lib.aws_batch.Action) | Enum | The Action to take when all specified conditions in a RetryStrategy are met. |
| [`AllocationStrategy`](/v2/docs/aws-cdk-lib.aws_batch.AllocationStrategy) | Enum | Determines how this compute environment chooses instances to spawn. |
| [`CfnComputeEnvironment.CapacityReservationsProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.CapacityReservationsProperty) | Struct |  |
| [`CfnComputeEnvironment.ComputeResourcesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.ComputeResourcesProperty) | Struct | Details about the compute resources managed by the compute environment. |
| [`CfnComputeEnvironment.ComputeScalingPolicyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.ComputeScalingPolicyProperty) | Struct |  |
| [`CfnComputeEnvironment.Ec2ConfigurationObjectProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.Ec2ConfigurationObjectProperty) | Struct | Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment. |
| [`CfnComputeEnvironment.EcsSettingsProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.EcsSettingsProperty) | Struct |  |
| [`CfnComputeEnvironment.EksAccessEntryProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.EksAccessEntryProperty) | Struct | The EKS access entry configuration for the compute environment. |
| [`CfnComputeEnvironment.EksConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.EksConfigurationProperty) | Struct | Configuration for the Amazon EKS cluster that supports the AWS Batch compute environment. |
| [`CfnComputeEnvironment.InfrastructureOptimizationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.InfrastructureOptimizationProperty) | Struct |  |
| [`CfnComputeEnvironment.InstanceLaunchTemplateProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.InstanceLaunchTemplateProperty) | Struct |  |
| [`CfnComputeEnvironment.InstanceRequirementsProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.InstanceRequirementsProperty) | Struct |  |
| [`CfnComputeEnvironment.LaunchTemplateSpecificationOverrideProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.LaunchTemplateSpecificationOverrideProperty) | Struct | An object that represents a launch template to use in place of the default launch template. |
| [`CfnComputeEnvironment.LaunchTemplateSpecificationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.LaunchTemplateSpecificationProperty) | Struct | An object that represents a launch template that's associated with a compute resource. |
| [`CfnComputeEnvironment.ManagedInstancesLocalStorageConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.ManagedInstancesLocalStorageConfigurationProperty) | Struct |  |
| [`CfnComputeEnvironment.ManagedInstancesNetworkConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.ManagedInstancesNetworkConfigurationProperty) | Struct |  |
| [`CfnComputeEnvironment.ManagedInstancesProviderProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.ManagedInstancesProviderProperty) | Struct |  |
| [`CfnComputeEnvironment.ManagedInstancesStorageConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.ManagedInstancesStorageConfigurationProperty) | Struct |  |
| [`CfnComputeEnvironment.UpdatePolicyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironment.UpdatePolicyProperty) | Struct | Specifies the infrastructure update policy for the Amazon EC2 compute environment. |
| [`CfnComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnComputeEnvironmentProps) | Struct | Properties for defining a `CfnComputeEnvironment`. |
| [`CfnConsumableResourceProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnConsumableResourceProps) | Struct | Properties for defining a `CfnConsumableResource`. |
| [`CfnJobDefinition.AuthorizationConfigProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.AuthorizationConfigProperty) | Struct |  |
| [`CfnJobDefinition.ConsumableResourcePropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ConsumableResourcePropertiesProperty) | Struct | Contains a list of consumable resources required by a job. |
| [`CfnJobDefinition.ConsumableResourceRequirementProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ConsumableResourceRequirementProperty) | Struct | Information about a consumable resource required to run a job. |
| [`CfnJobDefinition.ContainerPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ContainerPropertiesProperty) | Struct | Container properties are used for Amazon ECS based job definitions. |
| [`CfnJobDefinition.DeviceProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.DeviceProperty) | Struct | An object that represents a container instance host device. |
| [`CfnJobDefinition.EcsPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EcsPropertiesProperty) | Struct | An object that contains the properties for the Amazon ECS resources of a job. |
| [`CfnJobDefinition.EcsTaskPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EcsTaskPropertiesProperty) | Struct | The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. |
| [`CfnJobDefinition.EfsVolumeConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EfsVolumeConfigurationProperty) | Struct |  |
| [`CfnJobDefinition.EksContainerEnvironmentVariableProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksContainerEnvironmentVariableProperty) | Struct | An environment variable. |
| [`CfnJobDefinition.EksContainerProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksContainerProperty) | Struct | EKS container properties are used in job definitions for Amazon EKS based job definitions to describe the properties for a container node in the pod that's launched as part of a job. |
| [`CfnJobDefinition.EksContainerVolumeMountProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksContainerVolumeMountProperty) | Struct | The volume mounts for a container for an Amazon EKS job. |
| [`CfnJobDefinition.EksPersistentVolumeClaimProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksPersistentVolumeClaimProperty) | Struct | A `persistentVolumeClaim` volume is used to mount a [PersistentVolume](https://docs.aws.amazon.com/https://kubernetes.io/docs/concepts/storage/persistent-volumes/) into a Pod. PersistentVolumeClaims are a way for users to "claim" durable storage without knowing the details of the particular cloud environment. See the information about [PersistentVolumes](https://docs.aws.amazon.com/https://kubernetes.io/docs/concepts/storage/persistent-volumes/) in the *Kubernetes documentation* . |
| [`CfnJobDefinition.EksPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksPropertiesProperty) | Struct | An object that contains the properties for the Kubernetes resources of a job. |
| [`CfnJobDefinition.EksSecretProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksSecretProperty) | Struct | Specifies the configuration of a Kubernetes `secret` volume. |
| [`CfnJobDefinition.EksVolumeProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksVolumeProperty) | Struct | Specifies an Amazon EKS volume for a job definition. |
| [`CfnJobDefinition.EmptyDirProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EmptyDirProperty) | Struct |  |
| [`CfnJobDefinition.EnvironmentProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EnvironmentProperty) | Struct | The Environment property type specifies environment variables to use in a job definition. |
| [`CfnJobDefinition.EphemeralStorageProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EphemeralStorageProperty) | Struct | The amount of ephemeral storage to allocate for the task. |
| [`CfnJobDefinition.EvaluateOnExitProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EvaluateOnExitProperty) | Struct | Specifies an array of up to 5 conditions to be met, and an action to take ( `RETRY` or `EXIT` ) if all conditions are met. |
| [`CfnJobDefinition.FargatePlatformConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.FargatePlatformConfigurationProperty) | Struct | The platform configuration for jobs that are running on Fargate resources. |
| [`CfnJobDefinition.FirelensConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.FirelensConfigurationProperty) | Struct | The FireLens configuration for the container. |
| [`CfnJobDefinition.HostPathProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.HostPathProperty) | Struct |  |
| [`CfnJobDefinition.ImagePullSecretProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ImagePullSecretProperty) | Struct | References a Kubernetes secret resource. |
| [`CfnJobDefinition.JobTimeoutProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.JobTimeoutProperty) | Struct | An object that represents a job timeout configuration. |
| [`CfnJobDefinition.LinuxParametersProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.LinuxParametersProperty) | Struct | Linux-specific modifications that are applied to the container, such as details for device mappings. |
| [`CfnJobDefinition.LogConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.LogConfigurationProperty) | Struct | Log configuration options to send to a custom log driver for the container. |
| [`CfnJobDefinition.MetadataProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.MetadataProperty) | Struct |  |
| [`CfnJobDefinition.MountPointProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.MountPointProperty) | Struct | Details for a Docker volume mount point that's used in a job's container properties. |
| [`CfnJobDefinition.MountPointsProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.MountPointsProperty) | Struct |  |
| [`CfnJobDefinition.MultiNodeEcsPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.MultiNodeEcsPropertiesProperty) | Struct | An object that contains the properties for the Amazon ECS resources of a job. |
| [`CfnJobDefinition.MultiNodeEcsTaskPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.MultiNodeEcsTaskPropertiesProperty) | Struct | The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. |
| [`CfnJobDefinition.NetworkConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.NetworkConfigurationProperty) | Struct | The network configuration for jobs that are running on Fargate resources. |
| [`CfnJobDefinition.NodePropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.NodePropertiesProperty) | Struct | An object that represents the node properties of a multi-node parallel job. |
| [`CfnJobDefinition.NodeRangePropertyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.NodeRangePropertyProperty) | Struct | This is an object that represents the properties of the node range for a multi-node parallel job. |
| [`CfnJobDefinition.PodPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.PodPropertiesProperty) | Struct |  |
| [`CfnJobDefinition.RepositoryCredentialsProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.RepositoryCredentialsProperty) | Struct | The repository credentials for private registry authentication. |
| [`CfnJobDefinition.ResourceRequirementProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ResourceRequirementProperty) | Struct | The type and amount of a resource to assign to a container. |
| [`CfnJobDefinition.ResourceRetentionPolicyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ResourceRetentionPolicyProperty) | Struct | Specifies the resource retention policy settings for a job definition. |
| [`CfnJobDefinition.ResourcesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.ResourcesProperty) | Struct |  |
| [`CfnJobDefinition.RetryStrategyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.RetryStrategyProperty) | Struct | The retry strategy that's associated with a job. |
| [`CfnJobDefinition.RuntimePlatformProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.RuntimePlatformProperty) | Struct | An object that represents the compute environment architecture for AWS Batch jobs on Fargate. |
| [`CfnJobDefinition.S3FilesVolumeConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.S3FilesVolumeConfigurationProperty) | Struct |  |
| [`CfnJobDefinition.SecretProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.SecretProperty) | Struct | An object that represents the secret to expose to your container. |
| [`CfnJobDefinition.SecurityContextProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.SecurityContextProperty) | Struct |  |
| [`CfnJobDefinition.TaskContainerDependencyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.TaskContainerDependencyProperty) | Struct | A list of containers that this task depends on. |
| [`CfnJobDefinition.TaskContainerPropertiesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.TaskContainerPropertiesProperty) | Struct | Container properties are used for Amazon ECS-based job definitions. |
| [`CfnJobDefinition.TimeoutProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.TimeoutProperty) | Struct |  |
| [`CfnJobDefinition.TmpfsProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.TmpfsProperty) | Struct | The container path, mount options, and size of the `tmpfs` mount. |
| [`CfnJobDefinition.UlimitProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.UlimitProperty) | Struct | The `ulimit` settings to pass to the container. For more information, see [Ulimit](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Ulimit.html) . |
| [`CfnJobDefinition.VolumesHostProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.VolumesHostProperty) | Struct |  |
| [`CfnJobDefinition.VolumesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.VolumesProperty) | Struct |  |
| [`CfnJobDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinitionProps) | Struct | Properties for defining a `CfnJobDefinition`. |
| [`CfnJobQueue.ComputeEnvironmentOrderProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobQueue.ComputeEnvironmentOrderProperty) | Struct | The order that compute environments are tried in for job placement within a queue. |
| [`CfnJobQueue.JobStateTimeLimitActionProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobQueue.JobStateTimeLimitActionProperty) | Struct | Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time. |
| [`CfnJobQueue.ServiceEnvironmentOrderProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobQueue.ServiceEnvironmentOrderProperty) | Struct | Specifies the order of a service environment for a job queue. |
| [`CfnJobQueueProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnJobQueueProps) | Struct | Properties for defining a `CfnJobQueue`. |
| [`CfnQuotaShare.QuotaShareCapacityLimitProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnQuotaShare.QuotaShareCapacityLimitProperty) | Struct |  |
| [`CfnQuotaShare.QuotaSharePreemptionConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnQuotaShare.QuotaSharePreemptionConfigurationProperty) | Struct |  |
| [`CfnQuotaShare.QuotaShareResourceSharingConfigurationProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnQuotaShare.QuotaShareResourceSharingConfigurationProperty) | Struct |  |
| [`CfnQuotaShareProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnQuotaShareProps) | Struct | Properties for defining a `CfnQuotaShare`. |
| [`CfnSchedulingPolicy.FairsharePolicyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy.FairsharePolicyProperty) | Struct | The fair-share scheduling policy details. |
| [`CfnSchedulingPolicy.QuotaSharePolicyProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy.QuotaSharePolicyProperty) | Struct | Quota Share Policy for the Job Queue. |
| [`CfnSchedulingPolicy.ShareAttributesProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicy.ShareAttributesProperty) | Struct | Specifies the weights for the share identifiers for the fair-share policy. |
| [`CfnSchedulingPolicyProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnSchedulingPolicyProps) | Struct | Properties for defining a `CfnSchedulingPolicy`. |
| [`CfnServiceEnvironment.CapacityLimitProperty`](/v2/docs/aws-cdk-lib.aws_batch.CfnServiceEnvironment.CapacityLimitProperty) | Struct | Defines the capacity limit for a service environment. |
| [`CfnServiceEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.CfnServiceEnvironmentProps) | Struct | Properties for defining a `CfnServiceEnvironment`. |
| [`ComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.ComputeEnvironmentProps) | Struct | Props common to all ComputeEnvironments. |
| [`ConsumableResourceGrants`](/v2/docs/aws-cdk-lib.aws_batch.ConsumableResourceGrants) | Facade | Collection of grant methods for a IConsumableResourceRef. |
| [`ConsumableResourceProps`](/v2/docs/aws-cdk-lib.aws_batch.ConsumableResourceProps) | Struct | Properties for defining a Batch Consumable Resource. |
| [`ConsumableResourceType`](/v2/docs/aws-cdk-lib.aws_batch.ConsumableResourceType) | Enum | The type of consumable resource. |
| [`CustomReason`](/v2/docs/aws-cdk-lib.aws_batch.CustomReason) | Struct | The corresponding Action will only be taken if *all* of the conditions specified here are met. |
| [`DefaultInstanceClass`](/v2/docs/aws-cdk-lib.aws_batch.DefaultInstanceClass) | Enum | Batch default instances types. |
| [`Device`](/v2/docs/aws-cdk-lib.aws_batch.Device) | Struct | A container instance host device. |
| [`DevicePermission`](/v2/docs/aws-cdk-lib.aws_batch.DevicePermission) | Enum | Permissions for device access. |
| [`DnsPolicy`](/v2/docs/aws-cdk-lib.aws_batch.DnsPolicy) | Enum | The DNS Policy for the pod used by the Job Definition. |
| [`EcsContainerDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.EcsContainerDefinitionProps) | Struct | Props to configure an EcsContainerDefinition. |
| [`EcsEc2ContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.EcsEc2ContainerDefinition) | Construct | A container orchestrated by ECS that uses EC2 resources. |
| [`EcsEc2ContainerDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.EcsEc2ContainerDefinitionProps) | Struct | Props to configure an EcsEc2ContainerDefinition. |
| [`EcsFargateContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.EcsFargateContainerDefinition) | Construct | A container orchestrated by ECS that uses Fargate resources. |
| [`EcsFargateContainerDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.EcsFargateContainerDefinitionProps) | Struct | Props to configure an EcsFargateContainerDefinition. |
| [`EcsJobDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.EcsJobDefinitionProps) | Struct | Props for EcsJobDefinition. |
| [`EcsMachineImage`](/v2/docs/aws-cdk-lib.aws_batch.EcsMachineImage) | Struct | A Batch MachineImage that is compatible with ECS. |
| [`EcsMachineImageType`](/v2/docs/aws-cdk-lib.aws_batch.EcsMachineImageType) | Enum | Maps the image to instance types. |
| [`EcsVolume`](/v2/docs/aws-cdk-lib.aws_batch.EcsVolume) | Class | Represents a Volume that can be mounted to a container that uses ECS. |
| [`EcsVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.EcsVolumeOptions) | Struct | Options to configure an EcsVolume. |
| [`EfsVolume`](/v2/docs/aws-cdk-lib.aws_batch.EfsVolume) | Class | A Volume that uses an AWS Elastic File System (EFS); |
| [`EfsVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.EfsVolumeOptions) | Struct | Options for configuring an EfsVolume. |
| [`EksContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.EksContainerDefinition) | Construct | A container that can be run with EKS orchestration on EC2 resources. |
| [`EksContainerDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.EksContainerDefinitionProps) | Struct | Props to configure an EksContainerDefinition. |
| [`EksJobDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.EksJobDefinitionProps) | Struct | Props for EksJobDefinition. |
| [`EksMachineImage`](/v2/docs/aws-cdk-lib.aws_batch.EksMachineImage) | Struct | A Batch MachineImage that is compatible with EKS. |
| [`EksMachineImageType`](/v2/docs/aws-cdk-lib.aws_batch.EksMachineImageType) | Enum | Maps the image to instance types. |
| [`EksVolume`](/v2/docs/aws-cdk-lib.aws_batch.EksVolume) | Class | A Volume that can be mounted to a container supported by EKS. |
| [`EksVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.EksVolumeOptions) | Struct | Options to configure an EksVolume. |
| [`EmptyDirMediumType`](/v2/docs/aws-cdk-lib.aws_batch.EmptyDirMediumType) | Enum | What medium the volume will live in. |
| [`EmptyDirVolume`](/v2/docs/aws-cdk-lib.aws_batch.EmptyDirVolume) | Class | A Kubernetes EmptyDir volume. |
| [`EmptyDirVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.EmptyDirVolumeOptions) | Struct | Options for a Kubernetes EmptyDir volume. |
| [`FairshareSchedulingPolicyProps`](/v2/docs/aws-cdk-lib.aws_batch.FairshareSchedulingPolicyProps) | Struct | Fairshare SchedulingPolicy configuration. |
| [`FargateComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.FargateComputeEnvironmentProps) | Struct | Props for a FargateComputeEnvironment. |
| [`HostPathVolume`](/v2/docs/aws-cdk-lib.aws_batch.HostPathVolume) | Class | A Kubernetes HostPath volume. |
| [`HostPathVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.HostPathVolumeOptions) | Struct | Options for a kubernetes HostPath volume. |
| [`HostVolume`](/v2/docs/aws-cdk-lib.aws_batch.HostVolume) | Class | Creates a Host volume. |
| [`HostVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.HostVolumeOptions) | Struct | Options for configuring an ECS HostVolume. |
| [`IComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.IComputeEnvironment) | Interface | Represents a ComputeEnvironment. |
| [`IConsumableResource`](/v2/docs/aws-cdk-lib.aws_batch.IConsumableResource) | Interface | Represents a Batch Consumable Resource. |
| [`IEcsContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.IEcsContainerDefinition) | Interface | A container that can be run with ECS orchestration. |
| [`IEcsEc2ContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.IEcsEc2ContainerDefinition) | Interface | A container orchestrated by ECS that uses EC2 resources. |
| [`IEcsFargateContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.IEcsFargateContainerDefinition) | Interface | A container orchestrated by ECS that uses Fargate resources and is orchestrated by ECS. |
| [`IEksContainerDefinition`](/v2/docs/aws-cdk-lib.aws_batch.IEksContainerDefinition) | Interface | A container that can be run with EKS orchestration on EC2 resources. |
| [`IEksJobDefinition`](/v2/docs/aws-cdk-lib.aws_batch.IEksJobDefinition) | Interface | A JobDefinition that uses Eks orchestration. |
| [`IFairshareSchedulingPolicy`](/v2/docs/aws-cdk-lib.aws_batch.IFairshareSchedulingPolicy) | Interface | Represents a Fairshare Scheduling Policy. Instructs the scheduler to allocate ComputeEnvironment vCPUs based on Job shareIdentifiers. |
| [`IFargateComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.IFargateComputeEnvironment) | Interface | A ManagedComputeEnvironment that uses ECS orchestration on Fargate instances. |
| [`IJobDefinition`](/v2/docs/aws-cdk-lib.aws_batch.IJobDefinition) | Interface | Represents a JobDefinition. |
| [`IJobQueue`](/v2/docs/aws-cdk-lib.aws_batch.IJobQueue) | Interface | Represents a JobQueue. |
| [`ImagePullPolicy`](/v2/docs/aws-cdk-lib.aws_batch.ImagePullPolicy) | Enum | Determines when the image is pulled from the registry to launch a container. |
| [`IManagedComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.IManagedComputeEnvironment) | Interface | Represents a Managed ComputeEnvironment. |
| [`IManagedEc2EcsComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.IManagedEc2EcsComputeEnvironment) | Interface | A ManagedComputeEnvironment that uses ECS orchestration on EC2 instances. |
| [`ISchedulingPolicy`](/v2/docs/aws-cdk-lib.aws_batch.ISchedulingPolicy) | Interface | Represents a Scheduling Policy. |
| [`IUnmanagedComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.IUnmanagedComputeEnvironment) | Interface | Represents an UnmanagedComputeEnvironment. |
| [`JobDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.JobDefinitionProps) | Struct | Props common to all JobDefinitions. |
| [`JobQueueProps`](/v2/docs/aws-cdk-lib.aws_batch.JobQueueProps) | Struct | Props to configure a JobQueue. |
| [`JobStateTimeLimitAction`](/v2/docs/aws-cdk-lib.aws_batch.JobStateTimeLimitAction) | Struct | Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time. |
| [`JobStateTimeLimitActionsAction`](/v2/docs/aws-cdk-lib.aws_batch.JobStateTimeLimitActionsAction) | Enum | The action to take when a job is at the head of the job queue in the specified state for the specified period of time. |
| [`JobStateTimeLimitActionsReason`](/v2/docs/aws-cdk-lib.aws_batch.JobStateTimeLimitActionsReason) | Enum | The reason to log for the action being taken. |
| [`JobStateTimeLimitActionsState`](/v2/docs/aws-cdk-lib.aws_batch.JobStateTimeLimitActionsState) | Enum | The state of the job needed to trigger the action. |
| [`LinuxParameters`](/v2/docs/aws-cdk-lib.aws_batch.LinuxParameters) | Construct | Linux-specific options that are applied to the container. |
| [`LinuxParametersProps`](/v2/docs/aws-cdk-lib.aws_batch.LinuxParametersProps) | Struct | The properties for defining Linux-specific options that are applied to the container. |
| [`ManagedComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.ManagedComputeEnvironmentProps) | Struct | Props for a ManagedComputeEnvironment. |
| [`ManagedEc2ComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.ManagedEc2ComputeEnvironmentProps) | Struct | Props for a ManagedEc2ComputeEnvironment. |
| [`ManagedEc2EcsComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.ManagedEc2EcsComputeEnvironmentProps) | Struct | Props for a ManagedEc2EcsComputeEnvironment. |
| [`ManagedEc2EksComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.ManagedEc2EksComputeEnvironmentProps) | Struct | Props for a ManagedEc2EksComputeEnvironment. |
| [`MultiNodeContainer`](/v2/docs/aws-cdk-lib.aws_batch.MultiNodeContainer) | Struct | Runs the container on nodes [startNode, endNode]. |
| [`MultiNodeJobDefinitionProps`](/v2/docs/aws-cdk-lib.aws_batch.MultiNodeJobDefinitionProps) | Struct | Props to configure a MultiNodeJobDefinition. |
| [`OptimalInstanceType`](/v2/docs/aws-cdk-lib.aws_batch.OptimalInstanceType) | Class | Not a real instance type! |
| [`OrderedComputeEnvironment`](/v2/docs/aws-cdk-lib.aws_batch.OrderedComputeEnvironment) | Struct | Assigns an order to a ComputeEnvironment. |
| [`Reason`](/v2/docs/aws-cdk-lib.aws_batch.Reason) | Class | Common job exit reasons. |
| [`RetryStrategy`](/v2/docs/aws-cdk-lib.aws_batch.RetryStrategy) | Class | Define how Jobs using this JobDefinition respond to different exit conditions. |
| [`Secret`](/v2/docs/aws-cdk-lib.aws_batch.Secret) | Class | A secret environment variable. |
| [`SecretPathVolume`](/v2/docs/aws-cdk-lib.aws_batch.SecretPathVolume) | Class | Specifies the configuration of a Kubernetes secret volume. |
| [`SecretPathVolumeOptions`](/v2/docs/aws-cdk-lib.aws_batch.SecretPathVolumeOptions) | Struct | Options for a Kubernetes SecretPath Volume. |
| [`SecretVersionInfo`](/v2/docs/aws-cdk-lib.aws_batch.SecretVersionInfo) | Struct | Specify the secret's version id or version stage. |
| [`Share`](/v2/docs/aws-cdk-lib.aws_batch.Share) | Struct | Represents a group of Job Definitions. |
| [`Tmpfs`](/v2/docs/aws-cdk-lib.aws_batch.Tmpfs) | Struct | The details of a tmpfs mount for a container. |
| [`TmpfsMountOption`](/v2/docs/aws-cdk-lib.aws_batch.TmpfsMountOption) | Enum | The supported options for a tmpfs mount for a container. |
| [`Ulimit`](/v2/docs/aws-cdk-lib.aws_batch.Ulimit) | Struct | Sets limits for a resource with `ulimit` on linux systems. |
| [`UlimitName`](/v2/docs/aws-cdk-lib.aws_batch.UlimitName) | Enum | The resources to be limited. |
| [`UnmanagedComputeEnvironmentProps`](/v2/docs/aws-cdk-lib.aws_batch.UnmanagedComputeEnvironmentProps) | Struct | Represents an UnmanagedComputeEnvironment. |
