Skip to main content

AWS Batch ExecModule

Overview​

AwsBatchModule lists compute jobs in a known AWS Batch queue by status and looks up a single job by ID. Use it to check whether a workload finished, surface jobs waiting for compute, or give an operations team the job identifiers it needs to investigate failures.

The connector sends signed requests to the regional AWS Batch API. It returns normalized identifiers, state, and available timing information. Both operations are read-only.

Usage​

  1. Create a verified, READY AWS Batch connection in the Integration Account Console.
  2. Add AWS Batch in Workflow Studio and select the saved account under General > Connection.
  3. Enter the job's AWS region. Choose list_jobs and enter its queue to find jobs in a given state, or choose describe_job and supply the exact job ID.
  4. Branch on both the module result and the job state. For example, a successful read of a failed job can route an alert, while a retryable API error can route a delayed retry.

Inputs​

InputTypeRequiredDefaultPurpose
operationstringYes—list_jobs or describe_job.
regionstringYes—AWS region where the job runs, for example us-west-2.
jobQueuestringFor listing—Exact queue name or full AWS Batch queue ARN in the configured region.
jobStatusstringNoRUNNINGQueue filter. Use SUBMITTED, PENDING, RUNNABLE, STARTING, RUNNING, SUCCEEDED, or FAILED.
limitintegerNo25Maximum number of jobs in one list page, from 1 through 100.
nextTokenstringNo—Opaque continuation token from the preceding list page, up to 4,096 characters.
jobIdstringFor lookup—Exact AWS Batch job ID in UUID format.

Outputs​

OutputMeaning
status / operationModule result status and the recognized operation.
items / countJob summaries and the count on the current page.
hasMore / nextTokenWhether there is another page and the token to request it.
dataOne normalized job result for describe_job.
requestIdAWS request ID when available.
errorStable error code, redacted message, retryability, and HTTP status when available.

Job summaries include jobId, jobName, and jobStatus. They can also include jobArn and createdAt, startedAt, and stoppedAt as Unix epoch milliseconds. The lookup can also include the jobQueue and jobDefinition ARNs. Use jobStatus for the job lifecycle and status for the connector call.

IntegrationAccount Requirements​

Choose the AWS Batch template with account name AWS. Enter the access key ID in the protected API key field and the secret access key in the protected password field. Verify the saved account and confirm it is READY. Workflow Studio saves a reference to the account. The runtime credential broker resolves the key pair for the signed request.

Grant batch:ListJobs for queue listing and batch:DescribeJobs for exact lookup. These actions use Resource: "*" because AWS does not support resource-level scoping for them. Grant only the actions needed and use a dedicated AWS identity. Where appropriate, use the global aws:RequestedRegion condition to constrain the AWS regions. See the AWS Batch authorization reference and the IAM global condition key reference.

Configuration​

Choose the account and region that own the queue or job. The module uses the standard regional AWS Batch endpoint. Workflow settings accept the job inputs only. Custom endpoints, inline credentials, and session tokens are outside this connection contract.

Operations​

  • list_jobs calls ListJobs for one queue and one state. It reads one page. Reuse the returned token unchanged with the same account, region, queue, status, and page size.
  • describe_job calls DescribeJobs for a single job ID. Use it when an upstream step or a prior list result identifies the workload you need to check.

Errors and Failure Modes​

  • For validation and connection errors, check the required input for the selected operation, the account status, and verification. These errors can be resolved before sending a request.
  • For an access error, confirm that the AWS identity has the relevant action. For an unknown job, confirm the AWS account, region, and job ID. A successful list page can contain zero matching jobs.
  • For throttling and temporary service failures, use the retryability hint and bound the number and frequency of workflow-level retries. Use the AWS request ID when available to correlate a service error.

Example​

An overnight rendering pipeline uses the render-nightly queue. A morning operations workflow finds jobs that reached FAILED and passes their IDs to a review step.

{
"operation": "list_jobs",
"region": "us-west-2",
"jobQueue": "render-nightly",
"jobStatus": "FAILED",
"limit": 10
}

A matching page can contain a result like this.

{
"status": "success",
"operation": "list_jobs",
"count": 1,
"hasMore": false,
"items": [
{
"jobId": "9c4750ec-5aa8-4bb8-a0d5-d4a2e1736009",
"jobName": "render-hourly-tiles",
"jobStatus": "FAILED",
"stoppedAt": 1783524000000
}
]
}

Pass the selected jobId and the same region into describe_job to retrieve the job state and its queue and job definition. To limit a daily digest to the expected time window, filter on the returned timestamps and deduplicate by job ID before notifying the team.

Notes​

  • The module caps list pages at 100 jobs. Budget the number of pages or total elapsed time for each polling workflow. Stagger reads across queues to reduce throttling.
  • These operations are safe to repeat. Queue membership and job state may change between requests, so use the exact job ID when a downstream step depends on a specific job.
  • The scope covers AWS Batch compute jobs. Exact lookup accepts a base job UUID. Indexed array children and multi-node job IDs are outside exact lookup. Job submission, cancellation, termination, service job operations, child-job enumeration, and CloudWatch log retrieval are outside the connector's scope.
  • The output omits raw provider errors and job configuration such as parameters, environment variables, and container commands. Treat job names and other returned identifiers as operational data.