Skip to contents

Batch

Using Batch, you can run batch computing workloads on the Amazon Web Services Cloud. Batch computing is a common means for developers, scientists, and engineers to access large amounts of compute resources. Batch uses the advantages of the batch computing to remove the undifferentiated heavy lifting of configuring and managing required infrastructure. At the same time, it also adopts a familiar batch computing software approach. You can use Batch to efficiently provision resources, and work toward eliminating capacity constraints, reducing your overall compute costs, and delivering results more quickly.

As a fully managed service, Batch can run batch computing workloads of any scale. Batch automatically provisions compute resources and optimizes workload distribution based on the quantity and scale of your specific workloads. With Batch, there's no need to install or manage batch computing software. This means that you can focus on analyzing results and solving your specific problems instead.

Usage

batch(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- batch(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

cancel_jobCancels a job in an Batch job queue
create_compute_environmentCreates an Batch compute environment
create_consumable_resourceCreates an Batch consumable resource
create_job_queueCreates an Batch job queue
create_quota_shareCreates an Batch quota share
create_scheduling_policyCreates an Batch scheduling policy
create_service_environmentCreates a service environment for running service jobs
delete_compute_environmentDeletes an Batch compute environment
delete_consumable_resourceDeletes the specified consumable resource
delete_job_queueDeletes the specified job queue
delete_quota_shareDeletes the specified quota share
delete_scheduling_policyDeletes the specified scheduling policy
delete_service_environmentDeletes a Service environment
deregister_job_definitionDeregisters an Batch job definition
describe_compute_environmentsDescribes one or more of your compute environments
describe_consumable_resourceReturns a description of the specified consumable resource
describe_job_definitionsDescribes a list of job definitions
describe_job_queuesDescribes one or more of your job queues
describe_jobsDescribes a list of Batch jobs
describe_quota_shareReturns a description of the specified quota share
describe_scheduling_policiesDescribes one or more of your scheduling policies
describe_service_environmentsDescribes one or more of your service environments
describe_service_jobThe details of a service job
get_job_queue_snapshotProvides a snapshot of job queue state, including ordering of RUNNABLE jobs, as well as capacity utilization for already dispatched jobs
list_consumable_resourcesReturns a list of Batch consumable resources
list_jobsReturns a list of Batch jobs
list_jobs_by_consumable_resourceReturns a list of Batch jobs that require a specific consumable resource
list_quota_sharesReturns a list of Batch quota shares associated with a job queue
list_scheduling_policiesReturns a list of Batch scheduling policies
list_service_jobsReturns a list of service jobs for a specified job queue
list_tags_for_resourceLists the tags for an Batch resource
register_job_definitionRegisters an Batch job definition
submit_jobSubmits an Batch job from a job definition
submit_service_jobSubmits a service job to a specified job queue to run on SageMaker AI
tag_resourceAssociates the specified tags to a resource with the specified resourceArn
terminate_jobTerminates a job in a job queue
terminate_service_jobTerminates a service job in a job queue
untag_resourceDeletes specified tags from an Batch resource
update_compute_environmentUpdates an Batch compute environment
update_consumable_resourceUpdates a consumable resource
update_job_queueUpdates a job queue
update_quota_shareUpdates a quota share
update_scheduling_policyUpdates a scheduling policy
update_service_environmentUpdates a service environment
update_service_jobUpdates the priority of a specified service job in an Batch job queue

Examples

if (FALSE) { # \dontrun{
svc <- batch()
# This example cancels a job with the specified job ID.
svc$cancel_job(
  jobId = "1d828f65-7a4d-42e8-996d-3b900ed59dc4",
  reason = "Cancelling job."
)
} # }