"AWSBatch" (Batch Computation Provider)
Details
Environment Properties
"IOBucket" | (required) | name of the Amazon S3 bucket in which to store job input and output data | |
"JobDefinition" | (required) | ARN for the AWS Batch job definition to use for submitted jobs | |
"JobQueue" | (required) | ARN for the AWS Batch job queue to which jobs are submitted | |
"ServiceObject" | Automatic | ServiceObject for the "AWS" service |
Job Settings
"GPUCount" | Inherited | integer number of GPUs » | |
"Memory" | Automatic | "InformationUnit" quantity or integer number of mebibytes » | |
"VCPUCount" | Inherited | integer number of vCPUs » |



Job Statuses
"Submitted" | the submitted job has not yet been evaluated by the AWS Batch scheduler | |
"Pending" | the job is waiting for dependencies to be satisfied | |
"Runnable" | the job is waiting for compute resources to be available | |
"Starting" | the job has been scheduled to an instance and its container image is being downloaded | |
"Running" | the job's container has started | |
"Succeeded" | the job's execution has succeeded and its output has been uploaded | |
"Failed" | the job's execution has failed |
Job Properties
"JobExitCode" | exit code returned by the kernel within the job container | |
"JobLog" | console logs from the job container | |
"JobStatusReason" | string describing the reason for which the job is in its current state | |
"ProviderJobID" | AWS-provided unique identifier for the job |
"ChildJobExitCodes" | "JobExitCode" property of each array child job | |
"ChildJobStatusReasons" | "JobStatusReason" property of each array child job | |
"JobStatusReason" | string describing the reason for which the array job is in its current state | |
"ProviderJobID" | AWS-provided unique identifier for the array job |
"JobExitCode" | exit code returned by the kernel within the job container | |
"JobLog" | console logs from the child job container | |
"JobStatusReason" | string describing the reason for which the child job is in its current state | |
"ProviderJobID" | AWS-provided unique identifier for the child job |
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Create an "AWSBatch" RemoteBatchSubmissionEnvironment object, after configuring the "AWSBatch" batch computation provider as described in the Set Up the AWS Batch Computation Provider workflow:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bkqbsj

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-h14fw1
Submit a job using the created environment:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-jyh8rr

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bepkqd

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-qizr2

Query the job’s status again, after it has completed:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-fln9ob


https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-h66qpm

Create an environment object using an explicitly specified "AWS" service object:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-b6wpwo

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-zl8po

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-g57drg

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-hiu7n1
Job Settings (4)
"GPUCount" (1)
Submit an array job to AWS Batch that uses GPU computation to perform inference with a pretrained neural net:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-mlkj7

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-ba6vw3
Download the array job output:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-glvxje

"Memory" (2)
The memory limit for a job can be adjusted with the "Memory" job setting:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-il1x98

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-gc51ad

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-fihutk

If not otherwise specified, the default memory limit is based on the configured vCPU and GPU counts:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-cneu2n

"VCPUCount" (1)
Instruct AWS Batch to allocate four vCPUs to a submitted job:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bvt2n

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bpiila

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-h4w7dx

Job Properties (2)
"Single" Jobs (1)
Submit a batch job to AWS Batch using RemoteBatchSubmit:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-df9rlo

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-4cxf6
Query the job’s status along with the reason why the job transitioned to that state:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-ecxdi

Obtain the console output from the job container:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-i43qt

"Array" and "ArrayChild" Jobs (1)
Submit an array job to AWS Batch using RemoteBatchMapSubmit:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-capz2h

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-dv73e5
Query the status of each child job along with the reason why each transitioned to its current state:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-ih7mxw

Obtain a RemoteBatchJobObject expression representing the first child job:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-e69pyd

Query the child job’s status along with the reason why the child job transitioned to that state:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bk9auq

Obtain the console output from the child job container:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-eauidf

Properties & Relations (1)Properties of the function, and connections to other functions
If a job was terminated with RemoteBatchJobAbort, the value of the "JobStatusReason" property will indicate that the termination request originated from the Wolfram Language:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-6p2du

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-is4v1y

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bf4sch

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-jter1s

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-co85uc

Possible Issues (2)Common pitfalls and unexpected behavior
AWS Batch terminates jobs that exceed their memory limit:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-uliad

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-fhgdjr

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-nfqcpk

The memory limit for a job can be adjusted with the "Memory" job setting:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-b00ugz

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bgjyjq

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-bz9g0r

AWS Batch deletes a job’s metadata 24 hours after the job reaches a completed state ("Succeeded" or "Failed"). This will cause metadata queries to return a missing value:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-cdysar

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-r4jjn

The job’s output data will still be accessible until it is either manually deleted or automatically expired by the lifecycle policy on the submission environment's I/O bucket, if such a policy is configured:

https://wolfram.com/xid/0ihah4xlexcllho87hjuda310pqpy0uqdloyx40-b5exw8
