cloudknot.aws.BatchJob

class cloudknot.aws.BatchJob(job_id=None, name=None, job_queue=None, job_definition=None, input_=None, starmap=False, environment_variables=None, array_job=True)[source]

Class for defining AWS Batch Job.

Initialize an AWS Batch Job object.

If requesting information on a pre-existing job, job_id is required. Otherwise, name, job_queue, and job_definition are required to submit a new job.

Parameters
  • job_id (string) – The AWS jobID, if requesting a job that already exists

  • name (string) – Name of the job. Must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]*

  • job_queue (string) – Job queue ARN specifying the job queue to which this job will be submitted

  • job_definition (namedtuple or object) – namedtuple specifying the job definition on which to base this job. Must contain fields ‘name’, ‘arn’, ‘output_bucket’, and ‘retries’

  • input – The input to be pickled and sent to the batch job via S3

  • starmap (bool) – If True, assume input is already grouped in tuples from a single iterable.

  • environment_variables (list of dict) – list of key/value pairs representing environment variables sent to the container

  • array_job (bool) – If True, this batch job will be an array_job. Default: True