g. Run a Single Job

In this step, you launch a job using the AWS CLI. (Note that you could also use the AWS Management Console or the AWS SDK, but this workshop does not cover those options.) Use the following commands in AWS CLI to run a single job. Make sure to replace YOUR-JOB-QUEUE-NAME and YOUR-JOB-DEFINITION-NAME with the values of the job queue and job definition you just created.

aws batch submit-job --job-name my-job --job-queue YOUR-JOB-QUEUE-NAME --job-definition YOUR-JOB-DEFINITION-NAME

If the job does not run, double-check that the job queue name and job definition are correct.

Keep track of the Job Id because you can use it to show the status of a job:

aws batch describe-jobs --jobs YOUR-JOB-ID

A JSON displays and describes the status of you job.