DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Engin ALTAY for AWS Community Builders

Posted on

Bring AWS Notifications Into Your Slack Channel

Today’s software development lifecycle world requires responding to notifications immediately; such as incidents, application deployments, security events and so on.

ChatOps β€” The Slack Way

Nowadays, most of the DevOps teams rely on Slack to collaborate with team members and the system they manage. In the notifications, teams might need to switch among Slack, email, text messages and phone calls at the end of the day. In addition to context switching, merging the data from all those different sources is inefficient and time consuming for teams who monitor and interact with their AWS resources.

Meet AWS Chatbot. Interactive agent that makes it easier to monitor and interact with your Amazon Web Services (AWS) resources from your team’s Slack channels. By integrating AWS Chatbot with Slack, DevOps teams can receive real-time notifications, view incident details, and response incident quickly without need to cycle among other tools.

β€œWith AWS Chatbot, all notifications centrally managed within Slack that our teams already use every day. We’ve configured to receive various notifications such as network & system alerts, application deployments, performance monitoring and more directly into related Slack channels. Teams can take action immediately without needing to switch from where they’re already working. This speed up our response time and overall development agility.” β€” Engin Altay, SRE, Foreks Digital.

Integrating AWS Chatbot with Slack

Let’s move on AWS Console to begin integrating AWS Chatbot with Slack channel.

Create an Amazon SNS Topic

Amazon Simple Notification Service (SNS) is a fully managed Pub/Sub messaging service that can send notifications two-ways, A2A and A2P.

To create Amazon SNS topic, navigate to AWS Console, go SNS dashboard and create Standart type of topic.

Create standart type of Amazon SNS topic

Setting up AWS Chatbot

AWS Chatbot is an AWS service that enables ChatOps for teams. AWS Chatbot processes notifications from Amazon Simple Notification Service (Amazon SNS), and forwards them to chat rooms so teams can monitor and respond to AWS related events in their Slack channel.

AWS Chatbot supports Amazon Chime or Slack chat clients.

Navigate to AWS Console, go to AWS Chatbot and configure new client.

AWS Chatbot β€” Configure new client type as Slack.

When you click configure, you’ll be redirected to Slack workspace.

Add AWS Chatbot to Slack workspace

Click Add to Slack, and you’ll be asked for required permissions for AWS Chatbot to interact with your Slack channel.

Rename bot user as you wish, which will be shown in your Slack channel.

.

Then, add bot user to Slack by running the following command in related channel.

/invite @aws-bot
Enter fullscreen mode Exit fullscreen mode




AWS Chatbot β€” Configure the Slack Channel Settings

AWS Chatbot requires your Slack channel ID to send notifications to specified channel.

AWS Chatbot requires Slack private channel ID.

In Slack, get channel ID by right clicking the channel and copy the link. Channel ID is the string at the end of the URL.

Then, AWS Chatbot requires IAM permissions to perform actions.

AWS Chatbot needs IAM role to perform actions.

From the policy templates, select Notification permissions. It’s enough to get metric from Amazon CloudWatch.

Lastly, AWS Chatbot needs SNS topic you previously created to send notifications from AWS services to your chat client.

AWS Chatbot β€” select SNS topic and region its created.

Click Configure, and that’s it! Successfully integrated AWS Chatbot with Slack workspace.

To verify, go to SNS dashboard and see subscription status is confirmed for AWS Chatbot.

SNS topic subscription confirmed for AWS Chatbot.

After all integration and configuration steps, I’d like to show a real world example that one of our alarm from AWS CloudWatch displayed as rich messages with graphs in our Slack channel.

.

Leveraging AWS Chatbot makes organizations easily manage, centralize, and monitor AWS notifications into their daily chat rooms. With AWS Chatbot, teams can collaborate and respond to events faster.

Thank you for taking the time to read my article. I appreciate you sharing your thoughts and feedback.

Resources

Top comments (0)

Create an Account!

πŸ‘€ Just want to lurk?

That's fine, you can still create an account and turn on features like 🌚 dark mode.