![]() In the following snippet of code, we show how to send notifications to Slack when an AWS CodePipeline project starts or finishes using our Chatbot module. Besides this, we need to create an IAM role for Chatbot. Slack redirects you from here to the Configure Slack Channel page. Select the Slack workspace to configure and choose Allow. The setup wizard redirects you to the Slack OAuth 2.0 page. Then, we create an aws_codestarnotifications_notification_rule that notifies the SNS topic when one of these events occur. In the AWS Chatbot console’s home page, choose Slack in the Chat client dropdown and choose Configure client. To send notifications, for example, when an AWS CodePipeline project starts or finishes, we will create a SNS topic and configure Chatbot to map that SNS topic. Sending notifications to Slack using the Chatbot Terraform module So, we send notifications to that SNS topic and Chatbot handles the process of sending messages to Slack. ![]() This module creates a AWS::Chatbot::SlackChannelConfiguration resource that maps a SNS topic to a Chatbot configuration. The Terraform code of this module is available on OBytes GitHub public repos. Chat bots can be very useful to quickly retrieve information without having to log in and click through applications. So, we are going to use a Terraform module that launches a CloudFormation stack behind the scenes to workaround this limitation. However, it supports configuration via CloudFormation. This means it has no native Terraform support. Terraform module to manage ChatbotĬhatbot was launched without API support. Under Configure a chat client, choose Slack, then choose Configure client.įrom the dropdown list at the top right, choose the Slack workspace that you want to use with AWS Chatbot and choose Allow. To do that, we have to perform these steps from the console: Set up AWS Chatbot Authorize Chatbot to post to Slackįirst of all, we need to authorize AWS Chatbot to send messages to our Slack. A few months ago, AWS made the Chatbot service generally available, so we are going to switch our Lambda function for AWS Chatbot. In a previous article of the series of articles on monitoring, we shown how to create a custom Lambda function and a SNS topic to send CloudWatch alarms to Slack. AWS Chatbot is an interactive agent for “ChatOps” that makes it easy to monitor and interact with your AWS resources in your Slack channels and Amazon Chime chat rooms.
0 Comments
Leave a Reply. |