---
title: AWS Batch
description: Reference for the awsbatch executor, which submits tasks to AWS Batch.
---

# AWS Batch

The `awsbatch` executor runs pipeline tasks using [AWS Batch](https://aws.amazon.com/batch/), a managed compute service that runs containerized workloads in AWS. It submits each task as an AWS Batch job.

To enable this executor, set `process.executor = 'awsbatch'` in the `nextflow.config` file. You can launch the pipeline from a local machine or an EC2 instance. Every pipeline process must specify a Docker image using the `container` directive. The pipeline work directory must be located in an S3 bucket.

Use the following process directives to control resource requests and other job characteristics:

- [accelerator][process-accelerator]
- [arch][process-arch] (only when using Fargate platform type for AWS Batch)
- [container][process-container]
- [containerOptions][process-containeroptions]
- [cpus][process-cpus]
- [disk][process-disk] (only when using Fargate platform type for AWS Batch)
- [memory][process-memory]
- [queue][process-queue]
- [resourcelabels][process-resourcelabels]
- [time][process-time]

The following [hints][process-hints] are supported:

- `consumableResources`: Specify [AWS Batch consumable resources](https://docs.aws.amazon.com/batch/latest/userguide/resource-aware-scheduling.html) as a list of name-value pairs. For example:

  ```nextflow
  hints consumableResources: ['my-license-a': 1, 'my-license-b': 2]
  ```

See [AWS Batch][aws-batch] for more information.

[aws-batch]: ../aws#aws-batch
[process-accelerator]: ../reference/process#accelerator
[process-arch]: ../reference/process#arch
[process-container]: ../reference/process#container
[process-containeroptions]: ../reference/process#containeroptions
[process-cpus]: ../reference/process#cpus
[process-disk]: ../reference/process#disk
[process-hints]: ../reference/process#hints
[process-memory]: ../reference/process#memory
[process-queue]: ../reference/process#queue
[process-resourcelabels]: ../reference/process#resourcelabels
[process-time]: ../reference/process#time
