Home

Awesome

watchbot

A library to help run a highly-scalable AWS service that performs data processing tasks in response to external events. You provide the messages and the logic to process them, while Watchbot handles making sure that your processing task is run at least once for each message. Watchbot is similar in many regards to AWS Lambda, but is more configurable, more focused on data processing, and not subject to several of Lambda's limitations.

Install and use the current watchbot version

Add these lines to your Dockerfile, to use the latest watchbot for the linux operating system.

RUN wget https://s3.amazonaws.com/ecs-watchbot-binaries/linux/v10.1.2/watchbot -O /usr/local/bin/watchbot
RUN chmod +x /usr/local/bin/watchbot

Helpful lingo

What you provide:

What Watchbot provides:

Building a Watchbot service

  1. Create a Github repository for your code.
  2. Write and test the code that a worker will perform in response to a message.
  3. Write a Dockerfile at the root of your repository which defines the steps required to bootstrap a worker. Rather than specifying a CMD instruction, use the command property in the cloudformation template to indicate what will be executed when your worker is launched in response to a message. Note that message details will be provided as environment variables to your worker subprocess, and that your worker's exit code will determine whether the message is deleted or returned to the queue (see below).
  4. Use the Dockerfile to build an image and store it in an ECR repository. See ecs-conex for a CI framework to do this for you whenever you commit to the repository.
  5. Write and deploy your service using a CloudFormation template that watchbot helps you to build.

More documentation

  1. Building a Watchbot template
  2. The worker's runtime environment
  3. What happens when workers fail?
  4. Logging and metrics
  5. Using Watchbot's reduce-mode
  6. Watchbot's command-line utilities
  7. Watchbot's CloudWatch alarms
  8. Upgrading to Watchbot v10