Getting ready

We need to do one quick thing before running the task.  Tasks in ECS go through revisions.  Each time you register a task definition with the same name ("family"), ECS defines a new revision number.  You can run any of the revisions.  

To run the most recent one, we need to list the task definitions for that family and find the most recent revision number.  The following lists all of the task definitions in the cluster.  At this point we only have one:

$ aws ecs list-task-definitions{  "taskDefinitionArns": [    "arn:aws:ecs:us-west-2:414704166289:task-definition/scraper-as-a-service:17"  ]}

Notice my revision number is at 17.  While this is my only currently registered version of this task, I have registered (and unregistered) 16 ...

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.