Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 3.96 KB

batch.md

File metadata and controls

44 lines (39 loc) · 3.96 KB

Batch

AWS's batch service · portable interface driver.Batch · AWS index

Operations (24)

Operation Description
CancelJob
CreateComputeEnvironment Compute environments.
CreateJobQueue Job queues.
CreateSchedulingPolicy Scheduling policies.
DeleteComputeEnvironment
DeleteJobQueue
DeleteSchedulingPolicy
DeregisterJobDefinition
DescribeComputeEnvironments
DescribeJobDefinitions
DescribeJobQueues
DescribeJobs
DescribeSchedulingPolicies
ListJobs
ListSchedulingPolicies
ListTagsForResource
RegisterJobDefinition Job definitions.
SubmitJob Jobs.
TagResource Tags (by ARN), shared across every taggable resource kind.
TerminateJob
UntagResource
UpdateComputeEnvironment
UpdateJobQueue
UpdateSchedulingPolicy

Not in scope

  • Jobs run no workload: a job always succeeds (container exitCode 0) once its dependencies succeed. By default it is SUCCEEDED as soon as it is submitted; with --async-settle it spends about one second each in SUBMITTED, RUNNABLE and STARTING, then five seconds in RUNNING (and stays PENDING while a dependency is unfinished). attempts is always empty, and retry strategies and timeouts are stored and echoed but never applied.
  • CancelJob on a PENDING job takes effect at once. Real Batch waits for the job's dependencies to finish first.
  • Array jobs: children are derived from the parent, not stored one by one. SEQUENTIAL and N_TO_N dependencies are honoured. An array parent reports PENDING while any child is unfinished.
  • Multi-node parallel jobs: nodes are derived from the job, not stored one by one. DescribeJobs on <jobId>#<n> and ListJobs with multiNodeJobId return each node with nodeDetails (nodeIndex, isMainNode) and the container, ECS or EKS properties of its node range. Every node, main or child, has the job's own status, reason and times; real Batch starts the child nodes only once the main node is RUNNING, and a child node can finish or fail on its own. CancelJob and TerminateJob take the job ID, not a node ID.
  • Fair-share scheduling policies are stored, validated and bound to queues, but they never change the order in which jobs run. Jobs never stay RUNNABLE because no capacity is free, so "Batch Job Queue Blocked" events are never sent.
  • "Batch Job State Change" events go to the EventBridge default bus on the serve scheduler's tick (and on any Batch job API call), one per status the job passed through; none is sent for the initial submission. In library mode, nothing ticks, so events are published when a job API call sees the change or when Tick is called. A job that fails reports only FAILED, without the earlier steps. Array children and multi-node nodes send no events of their own. Real Batch sends no state-change events for compute environments or job queues, so the emulator sends none either.
  • Error messages are written by the emulator. The exception type (ClientException, HTTP 400) is the documented one.
  • containerOverrides, ecsPropertiesOverride, eksPropertiesOverride and nodeOverrides are merged into the job detail DescribeJobs returns (environment variables by name, resource requirements by type, other fields replaced). On a job queue whose compute environments are FARGATE or FARGATE_SPOT, SubmitJob rejects nodeOverrides and multi-node job definitions with a ClientException, and RegisterJobDefinition rejects nodeProperties with the FARGATE platform capability. Other platform rules are not checked: multi-node jobs on Spot or UNMANAGED compute environments, the instanceType, memory and vcpus container overrides on Fargate, and ECS versus EKS properties against the compute environment, since EKS compute environments are not modeled.