One of the challenges faced by every organization is being promptly notified and responding to alerts to prevent customer-impacting distractions. AWS ChatBot brings notifications to your Slack and Amazon Chime webhooks, so your DevOps and SRE teams are aware of potential issues.
As of October 12, 2019, AWS ChatBot is in beta mode, meaning not every feature planned for the service may be available or working correctly. This article examines what AWS ChatBot is, how to set it up and how it looks in your Slack channels. This article will not cover how to set up channels in Slack or rooms in Amazon Chime.
What is AWS ChatBot?
Many development, production, DevOps and SRE teams communicate using some form of instant messaging application, such as Cisco Jabber, Google Hangouts, Slack, Amazon Chime and more. The advantage of having issues being reported in your instant messaging application is that potential issues can be seen by a wider audience and be immediately investigated and remediated.
AWS ChatBot currently supports notifications from:
- AWS Budgets (through SNS Topics);
- AWS CloudFormation (through stack options); and,
- Amazon CloudWatch.
Additionally, AWS ChatBot also supports Amazon CloudWatch Events from the following services:
- AWS Health;
- AWS Security Hub;
- Amazon GuardDuty;
- Amazon EventBridge;
- AWS Config; and,
- AWS Systems Manager.
There is no support at this time for other AWS Services which may be sending notifications through Simple Notification Service unless they trigger a CloudWatch metric. The exact method of configuring these services to send notifications to AWS ChatBot varies between the services. Additionally, the service configuration will need additional permissions to send the notification to AWS CHatBot.
Setting up AWS ChatBot
For this part of the discussion, I am assuming you already have at least one Slack channel defined, and you have the appropriate authorization to configure the Slack channel.
If you are not already in the AWS Console, login and select AWS ChatBot from the services list.
Once you have accessed the AWS ChatBot page, select the interface you want to configure, either Amazon Chime or Slack from the drop-down, and then click “Configure client”.
If you are configuring Slack, you will be prompted to enter your Slack workspace name
log in using your Slack credentials
and finally, grant AWS ChatBot the ability to access Slack.
At this point, we have granted AWS ChatBot the ability to access our Slack workspace, but we still have to configure the Slack channel AWS ChatBot will use. You can configure multiple channels if you so desire, but for this example, we will just configure 1 channel.
First, we need to select if this is a public channel or private channel. If you are new to Slack, don’t let these designations fool you. A public channel is still restricted to your Slack workspace. The difference is invitations must be sent to users to access a private channel. For our example, we will select a public channel.
Next, we need to select the channel for our AWS ChatBot from the drop-down list.
After selecting the channel our ChatBot will Interact with, we need to apply the permissions for the AWS ChatBot to access the CloudWatch data to send to the channel. Select to create the policy using a template and then select “Notification Permissions” if it is not already added. Finally, add a role name.
The last section is to select the region and the notification topics which should be sent through the Slack channel. In this example, we have selected us-east-1 and two notification topics.
Our Slack workspace is now configured to use AWS ChatBot. We should verify the operation at this point.
Once the AWS ChatBot and the notifications you want to have sent to AWS ChatBot, you can validate operation by triggering an alarm in CloudWatch, or from the service you configured for notifications.
For this example, I created a CloudWatch alarm to send a notification to an SNS topic when fewer than 5 SNS messages were published in 5 minutes.
I had to wait 5 minutes for the alarm to be triggered, which was ok for my purposes as I could keep working on the text of this article. However, we can see the details of the notification in the Slack channel.
Using this model means as soon as a notification is sent to an SNS queue, or a specific CloudWatch event occurs and associated with the Slack channel, the members of the Slack channel are notified.
From a DevOps/SRE perspective, when these notifications happen, the team members can decide who is going to address the issue.
There are no extra charges associated with AWS ChatBot, beyond what you are paying for the resources being monitored. This means the cost to implement AWS ChatBot for your DevOps and SRE teams is minimal after the initial set-up is performed.
AWS ChatBot, even in beta mode, can provide your organization early notification of possible customer impacting events. Being ahead of the curve by anticipating possible events, including security and configuration events, reduces the organization’s risk posture. While similar information can be sent to teams through SNS topics and subscriptions, the Slack channel allows the team to immediately talk about it and decide the action plan instead of first starting with a coordination event to decide who is going to work on the event.
About the Author
Chris is a highly-skilled Information Technology AWS Cloud, Training and Security Professional bringing cloud, security, training and process engineering leadership to simplify and deliver high-quality products. He is the co-author of more than seven books and author of more than 70 articles and book chapters in technical, management and information security publications. His extensive technology, information security, and training experience makes him a key resource who can help companies through technical challenges.
This article has been cross-posted to LinkedIn and Medium.
This article is Copyright © 2019, Chris Hare.