The goal of this tutorial is to analyze messages from a Twitch chat in real-time with Amazon Comprehend – a Natural Language Processing (NLP) service from AWS – in order to monitor sentiment in the chat. Using services such as Amazon Comprehend, AWS Fargate and Amazon CloudWatch, you will build a monitoring service that is easy to set up and yet powerful.

During the tutorial you will:

  • Connect to the Twitch API and listen for messages in a chat.
  • Send those messages to a sentiment detection API in Amazon Comprehend.
  • Extract the negative sentiment for each of those messages and send those values as metrics to CloudWatch.
  • Build a production scalable deployment using Fargate.

The application you build will be useful as-is to monitor negative sentiment and it can also be easily extended to monitor other kinds of properties of natural language.