aws batch39 CLI commands available for AWS Batch.
| Command | API Operation | Sample |
|---|---|---|
cancel-jobCancels a job in an Batch job queue. Jobs that are in a SUBMITTED, PENDING, or RUNNABLE state are cancelled and the job status is updated to FAILED. A PENDING job is canceled after all dependency jobs are completed. Therefore, it may take longer than expected to cancel a job in PENDING status. When | CancelJob | |
create-compute-environmentCreates an Batch compute environment. You can create MANAGED or UNMANAGED compute environments. MANAGED compute environments can use Amazon EC2 or Fargate resources. UNMANAGED compute environments can only use EC2 resources. In a managed compute environment, Batch manages the capacity and instance t | CreateComputeEnvironment | |
create-consumable-resourceCreates an Batch consumable resource. | CreateConsumableResource | |
create-job-queueCreates an Batch job queue. When you create a job queue, you associate one or more compute environments to the queue and assign an order of preference for the compute environments. You also set a priority to the job queue that determines the order that the Batch scheduler places jobs onto its associ | CreateJobQueue | |
create-scheduling-policyCreates an Batch scheduling policy. | CreateSchedulingPolicy | |
create-service-environmentCreates a service environment for running service jobs. Service environments define capacity limits for specific service types such as SageMaker Training jobs. | CreateServiceEnvironment | |
delete-compute-environmentDeletes an Batch compute environment. Before you can delete a compute environment, you must set its state to DISABLED with the UpdateComputeEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation. Compute environments that use Fargate resources must te | DeleteComputeEnvironment | |
delete-consumable-resourceDeletes the specified consumable resource. | DeleteConsumableResource | |
delete-job-queueDeletes the specified job queue. You must first disable submissions for a queue with the UpdateJobQueue operation. All jobs in the queue are eventually terminated when you delete a job queue. The jobs are terminated at a rate of about 16 jobs each second. It's not necessary to disassociate compute e | DeleteJobQueue | |
delete-scheduling-policyDeletes the specified scheduling policy. You can't delete a scheduling policy that's used in any job queues. | DeleteSchedulingPolicy | |
delete-service-environmentDeletes a Service environment. Before you can delete a service environment, you must first set its state to DISABLED with the UpdateServiceEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation. | DeleteServiceEnvironment | |
deregister-job-definitionDeregisters an Batch job definition. Job definitions are permanently deleted after 180 days. | DeregisterJobDefinition | |
describe-compute-environmentsDescribes one or more of your compute environments. If you're using an unmanaged compute environment, you can use the DescribeComputeEnvironment operation to determine the ecsClusterArn that you launch your Amazon ECS container instances into. | DescribeComputeEnvironments | |
describe-consumable-resourceReturns a description of the specified consumable resource. | DescribeConsumableResource | |
describe-job-definitionsDescribes a list of job definitions. You can specify a status (such as ACTIVE) to only return job definitions that match that status. | DescribeJobDefinitions | |
describe-job-queuesDescribes one or more of your job queues. | DescribeJobQueues | |
describe-jobsDescribes a list of Batch jobs. | DescribeJobs | |
describe-scheduling-policiesDescribes one or more of your scheduling policies. | DescribeSchedulingPolicies | |
describe-service-environmentsDescribes one or more of your service environments. | DescribeServiceEnvironments | |
describe-service-jobThe details of a service job. | DescribeServiceJob | |
get-job-queue-snapshotProvides a list of the first 100 RUNNABLE jobs associated to a single job queue and includes capacity utilization, including total usage and breakdown by share for fairshare scheduling job queues. | GetJobQueueSnapshot | |
list-consumable-resourcesReturns a list of Batch consumable resources. | ListConsumableResources | |
list-jobsReturns a list of Batch jobs. You must specify only one of the following items: A job queue ID to return a list of jobs in that job queue A multi-node parallel job ID to return a list of nodes for that job An array job ID to return a list of the children for that job | ListJobs | |
list-jobs-by-consumable-resourceReturns a list of Batch jobs that require a specific consumable resource. | ListJobsByConsumableResource | |
list-scheduling-policiesReturns a list of Batch scheduling policies. | ListSchedulingPolicies | |
list-service-jobsReturns a list of service jobs for a specified job queue. | ListServiceJobs | |
list-tags-for-resourceLists the tags for an Batch resource. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported. | ListTagsForResource | |
register-job-definitionRegisters an Batch job definition. | RegisterJobDefinition | |
submit-jobSubmits an Batch job from a job definition. Parameters that are specified during SubmitJob override parameters defined in the job definition. vCPU and memory requirements that are specified in the resourceRequirements objects in the job definition are the exception. They can't be overridden this way | SubmitJob | |
submit-service-jobSubmits a service job to a specified job queue to run on SageMaker AI. A service job is a unit of work that you submit to Batch for execution on SageMaker AI. | SubmitServiceJob | |
tag-resourceAssociates the specified tags to a resource with the specified resourceArn. If existing tags on a resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags that are associated with that resource are deleted as well. Batch resources that support ta | TagResource | |
terminate-jobTerminates a job in a job queue. Jobs that are in the STARTING or RUNNING state are terminated, which causes them to transition to FAILED. Jobs that have not progressed to the STARTING state are cancelled. | TerminateJob | |
terminate-service-jobTerminates a service job in a job queue. | TerminateServiceJob | |
untag-resourceDeletes specified tags from an Batch resource. | UntagResource | |
update-compute-environmentUpdates an Batch compute environment. | UpdateComputeEnvironment | |
update-consumable-resourceUpdates a consumable resource. | UpdateConsumableResource | |
update-job-queueUpdates a job queue. | UpdateJobQueue | |
update-scheduling-policyUpdates a scheduling policy. | UpdateSchedulingPolicy | |
update-service-environmentUpdates a service environment. You can update the state of a service environment from ENABLED to DISABLED to prevent new service jobs from being placed in the service environment. | UpdateServiceEnvironment |
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to NewsletterOur bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to NewsletterBatch