🆕 Video Course Out Now: Rapid Docker on AWS

marbot, our submission to the AWS Serverless Chatbot Competition

Andreas Wittig – 30 Sep 2016

Three things Michael and I love to do most: prototyping innovative products, playing around with the latest technology and learning new things. That is why we decided to take part in the AWS Serverless Chatbot Competition. We’d like to introduce marbot, our chatbot, to you and share the backstory of its creation.

marbot

Challenge

The AWS Serverless Chatbot Competition started on August 10 with the following conditions:

Create a working bot for Slack that runs on AWS Lambda. Applications must use AWS Lambda and Amazon API Gateway for bot logic and integration. Applications cannot be hosted on any other hosting platform. Use of Slack APIs, such as the Slack Events API, is encouraged but not required.

On top of that AWS provided the following submission recommendations:

  • Integrate Slack APIs, such as the Slack Events API
  • Utilize additional AWS services
  • Submit application to the Slack App Directory
  • Showcase natural language processing of chat conversations

But what to build?

Idea

Working as DevOps engineers in various teams we have always been looking for a tool to share on-call duty among many shoulders without the need for organizational overhead. We came up with the idea of building a chatbot to combine Amazon CloudWatch with Slack.

We defined the following feature set as minimum viable product:

  • Receiving alerts from Amazon CloudWatch via Amazon SNS
  • Escalating alerts if a team member isn’t acknowledging within 5 minutes
  • Managing alerts by accepting, passing or closing them
  • Analyzing alerts in a daily summary
  • Grouping alerts with a dedicated alarm gateway for each channel

How did we implement the chatbot?

Implementation

The following figure is showing an architectural overview of marbot. We used a bunch of services and APIs.

Serverless Architecture of marbot

Free Monitoring Checklist + Mind Map

Find the blind spots in your AWS monitoring!

Setting up monitoring on AWS is hard. AWS provides countless features and sources of events. Overlooking the important settings is easy. Our prioritized checklist includes all parts of a basic monitoring setup for AWS. Additionally, use our mind map to map your monitoring goals to AWS services. Download Free Monitoring Checklist + Mind Map!

The diagram was created with Cloudcraft - Visualize your cloud architecture like a pro.

Are you interested in the details? Read on!

Serverless

The Serverless Framework simplified the provisioning and deployment of all the resources needed to setup the environment.

AWS Lambda and Amazon API Gateway

We used the API Gateway and Lambda for creating our backend and implemented endpoints for incoming events from Slack as well as from CloudWatch via SNS.

Amazon DynamoDB

DynamoDB is our favorite NoSQL database on AWS. marbot is storing channel endpoints, alarms together with their escalation state, and Slack authentication credentials.

Amazon Kinesis Streams and Amazon Kinesis Analytics

To provide daily team statistics marbot is analyzing event data with the help of Kinesis Streams and Kinesis Analytics. The statistics generated by Kinesis Analytics include the number of received alarms, time to acknowledge, time to close and much more.

Amazon SQS

marbot needs to escalate alarms to the next level if a team member is not responding. We implemented the needed scalable timer with SQS and Lambda. The solution is similar to what I’ve already described in Integrate SQS and Lambda: serverless architecture for asynchronous workloads.

Amazon SNS and AWS CloudWatch

All you have to do as a marbot user is to send your CloudWatch alarms to an SNS topic. The SNS topic is then forwarding the alarm to the marbot backend.

No EC2 instances needed. The whole architecture relies on highly available and scalable AWS services.

Summary

marbot is accessible to the public and free to use. More and more teams are using marbot to connect Amazon CloudWatch and Slack to spread alerts among their team members.

Try marbot now! We are looking forward to your feedback.

Andreas Wittig

Andreas Wittig

I’m an independent consultant, technical writer, and programming founder. All these activities have to do with AWS. I’m writing this blog and all other projects together with my brother Michael.

In 2009, we joined the same company as software developers. Three years later, we were looking for a way to deploy our software—an online banking platform—in an agile way. We got excited about the possibilities in the cloud and the DevOps movement. It’s no wonder we ended up migrating the whole infrastructure of Tullius Walden Bank to AWS. This was a first in the finance industry, at least in Germany! Since 2015, we have accelerated the cloud journeys of startups, mid-sized companies, and enterprises. We have penned books like Amazon Web Services in Action and Rapid Docker on AWS, we regularly update our blog, and we are contributing to the Open Source community. Besides running a 2-headed consultancy, we are entrepreneurs building Software-as-a-Service products.

We are available for projects.

You can contact me via Email, Twitter, and LinkedIn.

Briefcase icon
Hire me