Automate your team’s AWS tasks with a Serverless Slack bot

Jorge Luis Vargas
The Startup
Published in
7 min readJul 8, 2019

--

Photo by Alev Takil on Unsplash

If you’re anything like me, you are lazy and you avoid repetitive tasks like the plague. Why would you keep repeating the same commands again and again, logging into your AWS console, going to the right service and triggering the commands? You can use that time to do real stuff.

That’s why we’re going to build a butler bot to automate AWS tasks using a Slack bot and an AWS lambda function.

Before starting

We will be using the following tools to easily deploy our bot.

  • NodeJS (available in your CLI) https://nodejs.org
  • Serverless Framework (available in your CLI) https://serverless.com

And of course you will need admin access to the following services:

  • Slack to create the bot app.
  • AWS, to be able to deploy our bot using the Serverless Framework.

If you don’t know how to add the AWS credentials to Serverless Framework, check the documentation explaining how to do it.

The architecture

The idea is to be able to give commands to our bot via Slack and pass those commands to our lambda function. Then, our bot should be able to call another AWS service and give us feedback about the…

--

--

Jorge Luis Vargas
The Startup

Full Stack Developer. Serverless, automation and processes enthusiast. AWS, PHP, NodeJS, JS, TypeScript.