How to do it

The following command registers the task with ECS:

$ aws ecs register-task-definition --cli-input-json file://td.json{  "taskDefinition": {    "volumes": [          ],    "family": "scraper",    "memory": "4096",    "placementConstraints": [          ]  ],  "cpu": "1024",  "containerDefinitions": [    {      "name": "rabbitmq",      "cpu": 0,      "volumesFrom": [              ],      "mountPoints": [              ],      "portMappings": [        {          "hostPort": 15672,          "protocol": "tcp",          "containerPort": 15672        },        {          "hostPort": 5672,          "protocol": "tcp",          "containerPort": 5672        }      ],      "environment": [              ],      "image": "414704166289.dkr.ecr.us-west-2.amazonaws.com/rabbitmq",      "memory": 256,      "essential": true    },    {      "name": "scraper-microservice",      "cpu": 0,      "essential": true,      "volumesFrom": [              ],      "mountPoints": [              ], "portMappings": ...

Get Python Web Scraping Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.