canonical: https://jentic.com/apis/amazonaws.com/batch

# AWS Batch

AWS Batch runs containerised batch computing workloads at any scale by dynamically provisioning the right amount and type of compute on EC2 or Fargate. The API lets you register job definitions, create compute environments backed by EC2 Spot, On-Demand, or Fargate capacity, define job queues with priority and scheduling policies, submit jobs with array and dependency support, and inspect or cancel jobs as they run. It is well suited to genomics pipelines, financial Monte Carlo, media transcoding, and other parallel container workloads.

## For AI agents

Submit, monitor, and cancel containerised batch jobs across managed compute environments and queues, with support for array jobs, dependencies, and Spot-backed scaling.

## Scope

Does not orchestrate Kubernetes pods, run interactive notebook sessions, or manage Spark clusters. Use for managed batch container scheduling on EC2 or Fargate only.

## Capabilities

- Register job definitions that describe the container image, vCPU, memory, environment variables, and IAM role for a batch job
- Create managed or unmanaged compute environments backed by EC2 Spot, EC2 On-Demand, or Fargate with min/max vCPU bounds
- Create job queues that map to one or more compute environments and apply priority and fair-share scheduling policies
- Submit jobs, array jobs (up to 10,000 children), and jobs with dependsOn relationships to other jobs
- Cancel or terminate running jobs and inspect their exit reason and CloudWatch Logs stream
- Define scheduling policies that allocate share between users or tenants on a shared queue
- Update compute environments to change capacity bounds, allocation strategies, or instance types

## Use cases

### Massively Parallel Array Job

Run a 5,000-task simulation, transcode, or analytics sweep without managing servers. Register a job definition with the container image and vCPU/memory request, then SubmitJob with arrayProperties.size=5000. AWS Batch fans out 5,000 child jobs onto the compute environment, retries failures based on the retry strategy, and writes per-job logs to CloudWatch Logs. Spot capacity keeps the run cheap.

Example prompt: SubmitJob with jobName=monte-carlo-2026-06-09, jobDefinition=monte-carlo:7, jobQueue=hpc-spot, and arrayProperties={size: 5000}, then poll DescribeJobs every 60 seconds until status=SUCCEEDED.

### Pipeline with Job Dependencies

Express a multi-stage pipeline (preprocess to analyse to post-process) by chaining jobs with dependsOn relationships. Each stage's SubmitJob call references the prior stage's job ID; AWS Batch holds dependent jobs in PENDING until the parent reaches SUCCEEDED. Suitable for ETL, genomics, and any directed-acyclic workflow that fits inside Batch's scheduler without needing Step Functions.

Example prompt: Submit job preprocess (returns id A), then submit job analyse with dependsOn=[{jobId: A}], then submit post-process with dependsOn=[{jobId: <analyse-id>}], all into queue analytics-prod.

### Cost-Optimised Fargate Spot

Run short-lived containerised batch workloads on Fargate Spot to cut compute spend by up to 70 percent. Create a managed compute environment with type=FARGATE_SPOT and a maxvCpus cap, attach it to a job queue, and submit jobs as normal. AWS Batch handles capacity reclaim by re-queuing interrupted jobs on the next available Fargate Spot capacity.

Example prompt: CreateComputeEnvironment with type=MANAGED, computeResources.type=FARGATE_SPOT, maxvCpus=256, and subnets=[subnet-xxx], then CreateJobQueue mapping to it with priority=1.

### Agent-Driven Job Operator

Let an agent take a research request such as 'rerun yesterday's failed sequencing batches with double the retry budget' and translate it into AWS Batch operations. The agent calls Jentic to list failed jobs, derive the array indices that need retry, and submit a new array job pointing at those indices. AWS credentials stay in your Jentic One instance.

Example prompt: Search Jentic for 'list failed AWS Batch jobs', execute it filtered to jobQueue=hpc-spot and status=FAILED in the last 24 hours, then SubmitJob with the failed indices and retryStrategy.attempts=4.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/submitjob | Submit a job, array job, or dependent job |
| POST | /v1/describejobs | Describe one or more jobs by ID |
| POST | /v1/listjobs | List jobs in a queue with filters |
| POST | /v1/canceljob | Cancel a job that is not yet running |
| POST | /v1/terminatejob | Terminate a running job |
| POST | /v1/registerjobdefinition | Register a job definition |
| POST | /v1/createcomputeenvironment | Create a compute environment |
| POST | /v1/createjobqueue | Create a job queue |

## Key resources

- **Job Definitions** — Container image, vCPU/memory, environment, and IAM role templates for batch jobs.
- **Compute Environments** — Managed pools of EC2 or Fargate capacity, with min and max vCPU bounds.
- **Job Queues** — Priority-ordered queues that dispatch jobs to one or more compute environments.
- **Jobs** — Single jobs, array jobs, and jobs with dependencies; submit, list, describe, and terminate.
- **Scheduling Policies** — Fair-share scheduling policies for multi-tenant queues.

## Why Jentic

- **Setup:** Wiring AWS Batch by hand means holding an access key ID and secret access key, computing an AWS Signature Version 4 signature per request, resolving the correct regional batch host, and handling retries and job-state polling yourself. Through Jentic you install once, import AWS Batch from the API Directory, store the AWS access key once, and your agent calls it.
- **Permission scoping:** Batch sends the job, queue, and compute-environment identifiers in the request body rather than the URL path, so scope your agent by the operations it needs, such as submitting a job or describing jobs. You choose which operations it may call, so actions like cancelling or terminating a job are not included unless you add them.
- **Credential handling:** Your AWS access key ID and secret access key are stored once, encrypted, by your own Jentic One instance, and the Signature Version 4 signature is computed at execution time. The raw keys never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'submit a batch job' or 'register a job definition', and Jentic returns the matching AWS Batch operation with its input schema so the agent calls the right endpoint without crawling the AWS reference.

## Related APIs

- **Amazon EC2** — Provides the underlying compute that AWS Batch managed compute environments provision.
- **AWS Lambda** — Serverless functions for short, request-scoped work where Batch's queue-and-container model is too heavy.
- **Amazon EKS** — Kubernetes-native batch via Argo Workflows, Volcano, or Kueue when the team already runs EKS.

## FAQ

### What authentication does the AWS Batch API use?

All requests are signed with AWS Signature Version 4 using an AWS access key ID and secret access key. Through Jentic, the credentials live encrypted in the vault and Jentic performs the signing server-side, so the agent never sees the raw secret.

### Can AWS Batch run jobs on Fargate instead of EC2?

Yes. Create a managed compute environment with computeResources.type=FARGATE or FARGATE_SPOT and AWS Batch will run jobs as Fargate tasks instead of EC2 instances. Fargate is well suited to short-lived jobs that need fast start times without the EC2 instance bootstrap delay.

### How do I submit a 1,000-task array job through Jentic?

Search Jentic for 'submit an AWS Batch job', load the SubmitJob schema, and execute it with arrayProperties={size: 1000}. The operation maps to POST /v1/submitjob. Jentic returns the parent job ID; each child carries an index in AWS_BATCH_JOB_ARRAY_INDEX so the container can fetch its work shard.

### What are the rate limits for the AWS Batch API?

Standard AWS service throttling applies; high SubmitJob rates can return ThrottlingException. AWS recommends batching submissions through array jobs (up to 10,000 children per call) rather than calling SubmitJob in tight loops.

### Can I express job dependencies in AWS Batch?

Yes. Pass dependsOn=[{jobId: <parent-id>}] when calling SubmitJob and the new job stays PENDING until the parent reaches SUCCEEDED. This supports linear pipelines and small DAGs natively without needing AWS Step Functions.

### Is AWS Batch free to use?

AWS Batch itself has no separate charge. You pay only for the EC2 or Fargate compute, the EBS or ephemeral storage, and the CloudWatch Logs the jobs consume.

### Can I limit what my agent is allowed to do with the AWS Batch API?

Yes. Because you run Jentic One yourself, your own rules decide which AWS Batch operations and which stored AWS credentials the agent may use. AWS Batch passes job, queue, and compute-environment identifiers in the request body rather than the URL, so you scope the agent by the operations it needs, such as SubmitJob, DescribeJobs, or ListJobs. Destructive actions like CancelJob or TerminateJob stay off limits unless you explicitly grant them.
