Tutorial: Create and register a job definition - Amazon Batch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Tutorial: Create and register a job definition

Now that your Docker image is in an image registry, you can specify it in an Amazon Batch job definition. Then, you can use it later to run an array job. This example only uses the Amazon CLI. However, you can also use the Amazon Web Services Management Console. For more information, see Create a single-node job definition .

To create a job definition
  1. Create a file named print-color-job-def.json in your workspace directory and paste the following into it. Replace the image repository URI with your own image's URI.

    { "jobDefinitionName": "print-color", "type": "container", "containerProperties": { "image": "aws_account_id.dkr.ecr.region.amazonaws.com/print-color", "resourceRequirements": [ { "type": "MEMORY", "value": "250" }, { "type": "VCPU", "value": "1" } ] } }
  2. Register the job definition with Amazon Batch.

    $ aws batch register-job-definition --cli-input-json file://print-color-job-def.json