Run the task

Now that you have the Docker image stored in ECR and an ECS cluster and Task Definition ready to run the container, you can actually run the service to start monitoring a Twitch chat automatically.

  1. Navigate to the Amazon ECS console and choose Task Definitions in the left menu.
  2. Select the checkbox of the Task Definition you just created.
  3. In the Actions drop down menu, select Run Task.
  4. In the VPC and security groups section, choose the Default VPC for your account and one of its subnets. You can find the default VPC by sorting your list of VPCs by isDefault. If you don’t have a Default VPC, you can choose another VPC and a subnet that has access to the internet.
  5. Expand the Advanced Options section, then expand the named container in the Container Overrides section.
  6. In Command override, add a comma-separated list of command-line arguments. So for example enter -c,tekken,-d,600000 to monitor the #tekken channel for 10 minutes (600,000 milliseconds).
  7. Choose Run Task.

If you click the Task link, you can view the status of the task. After the Last status changes to ‘RUNNING’, you should be able to see some logs in the Logs tab. After a few minutes, go back to CloudWatch to view negative sentiment for the channel you are monitoring.