AWS Cloud Operations Blog

Ten features for efficiently managing your AWS applications from Microsoft Teams and Slack using AWS Chatbot

ChatOps-based collaboration practices enable engineering and operations teams to use chat channels to streamline DevOps workflows. ChatOps enables teams to centralize communication about AWS applications, incidents, and progress in one place. It allows you to troubleshoot and operate applications collaboratively and securely from chat channels. ChatOps brings people, processes, tools, and automation into a cohesive experience. AWS Chatbot is a ChatOps service designed to monitor and operate AWS applications from Microsoft Teams and Slack collaboration platforms.

In this post, I will share ten features in AWS Chatbot to help you understand your application health and resolve issues faster from chat channels. If you are unfamiliar with AWS Chatbot, see Getting started with AWS Chatbot guide to learn more about AWS Chatbot and its capabilities.

1. Operate AWS applications from Microsoft Teams

You can monitor your AWS resources and application event notifications, retrieve telemetry, and remediate issues aided by Amazon Q Developer from Microsoft Teams. You use AWS IAM-based roles to take actions from the chat channels. For a tutorial on getting started with ChatOps for AWS in Microsoft Teams, see Blog: AWS Chatbot now integrates with Microsoft Teams and Tutorial: Get started with Microsoft Teams.

Amazon CloudWatch notification in Microsoft Teams chat channel is shown

Figure 1: A sample Amazon CloudWatch notification in Microsoft Teams

2. Seek answers from Amazon Q in chat channels

You can chat with Amazon Q Developer in Microsoft Teams and Slack channels that are configured with AWS Chatbot. AWS Chatbot provides summarized and concise answers to your AWS-related queries conversationally. You receive concise and accurate answers to questions to speed up your understanding of AWS services, architect solutions, and troubleshoot issues. You ask questions such as “@aws how do I know if my Lambda high CPU utilization is because of a concurrency related issue?” and receive prescriptive guidance on troubleshooting the CPU utilization issue. To enable Amazon Q in your chat channels, add AmazonQFullAccess IAM policy to the IAM role and guardrails associated with your Chatbot channel configuration. See Chatting with Amazon Q Developer in AWS Chatbot for steps to configure Amazon Q interactions in Microsoft Teams and Slack.

A sample interaction with Amazon Q in a Slack channel configured with the AWS Chatbot is shown

Figure 2: A sample Q&A with Amazon Q in chat channels configured with the AWS Chatbot

3. CDK, SDK, Cloud Control APIs, and Terraform support – Take your pick

Configuring your AWS Chatbot resources is easier than ever with AWS CDK, AWS SDK, AWS Cloud Control APIs and Terraform (with Cloud Control API Provider).

You can write code to configure your AWS Chatbot channel configurations and permissions. Terraform users can use the Terraform AWS Cloud Control Provider to manage AWS Chatbot resources. See the AWS Chatbot API Reference Guide and CDK documentation to get started.

4. Send custom notifications

Often, you need to notify channel members with additional contextual information about the health and performance of your AWS applications. You can customize the notifications delivered to your Microsoft Teams and Slack channels. The notifications can include application-specific details, tag team members, and include remediation steps. To receive custom notifications, you send a custom notification event in a specific schema format to an SNS topic. You generate these events by writing a Lambda function or using Amazon EventBridge Input Transformer and dispatch the event to an SNS topic associated with a Chatbot configuration. AWS Chatbot monitors the SNS topic and delivers custom notifications to the configured Microsoft Teams or Slack chat channels. To get started with custom notifications, see Custom notifications in the AWS Administrator Guide.

A custom AWS Chatbot notification in a Slack channel is shown

Figure 3: A sample AWS Chatbot custom notification in Slack

5. View Amazon CloudWatch Dashboards

You can monitor the state of your AWS applications by receiving CloudWatch alarm notifications in your chat channels. After you become aware of the issue, you need to find more information to understand the situation. You can now retrieve CloudWatch dashboards from the chat channels and discuss them collaboratively with your team. You select the List Dashboard button on the CloudWatch notifications to retrieve the available dashboards and metric graph widgets for the configured account. You can customize the metric graphs by customizing the start time, metric resolution, and statistics.

An Amazon CloudWatch dashboard metric in a Slack channel is shown

Figure 4: An Amazon CloudWatch dashboard metric in chat channel

6. Retrieve Amazon CloudWatch Logs Insights log data

When issues occur, one of the first things DevOps teams analyze are the CloudWatch Logs. Now you can retrieve your log data in CloudWatch Logs directly from your chat channels and analyze them collaboratively with your channel members. You select the Query logs button on the CloudWatch notifications to run your Saved Logs Insights queries or specify your custom queries to retrieve the CloudWatch log data.

A modal dialog box to retrieve Amazon CloudWatch LogsInsights logs from chat channels is shown.

Figure 5: Retrieve Amazon CloudWatch LogsInsights logs from chat channels

7. Run frequently used tasks with Command Aliases

You need to run operational tasks such as runbooks periodically. Now, you can create easy-to-remember command aliases for frequently used AWS CLI-based DevOps tasks. Channel members can then use the aliases to diagnose and remediate issues quickly. For example, you can use command aliases to increase Amazon EC2 Auto Scaling group details or run an AWS Lambda function. You don’t need to remember the exact CLI syntax when running command aliases. You create alias by typing: @aws alias create DescASG autoscaling describe-auto-scaling-groups --region us-east-2

To run the command, type : @aws run DescASG

You can also create aliases that takes parameters as inputs such as:

@aws alias create IncreaseAutoScalingLimit ssm start-automation-execution --document-name ASG_Scale_Up --parameters {"asgName": "BananaBillingServiceASG", "maxLimit": "$maxlimit"} --region $region_name

You then run the alias with the required parameters, such as: @aws IncreaseAutoScalingLimit 10 us-west-1

8. Customize Actions Buttons

You can configure action buttons displayed on the AWS service event notifications in Microsoft Teams and Slack channels. You can configure the action buttons to run frequently used DevOps runbook processes and incident response tasks to shorten diagnosis and resolution cycle time. For example, you can add an action button on the CloudWatch alarm notification to run an AWS Systems Manager runbook that performs tasks such as notifying various stakeholders, checking the status of multiple micro-services, etc. To configure a custom action button, select the settings button <Add button image here> on an event notification. Once configured, AWS Chatbot will display the custom button on the configured event notifications in the future. See Custom actions in the AWS Chatbot Administrator Guide to get started.

A modal dialog box to retrieve Amazon CloudWatch LogsInsights logs from chat channels is shown

Figure 6: A modal dialog to customize action buttons on AWS Chatbot notifications

9. Search your resources

When diagnosing issues, you frequently need to look up relevant AWS resources quickly. Now, you can find resources by asking questions in natural language. For example, you can ask “@aws in which regions am I using SNS or show ec2 instances in us-east-1?” and receive resources with deep links. To enable this feature in chat channels, you enable AWS Resource Explorer aggregate index-based search in your accounts. For more information on searching resources in chat channels, see Asking AWS resource questions in the AWS Chatbot Administrator Guide.

10. Use tags for AWS Chatbot resources

You can now tag AWS Chatbot resources such as channel configurations. These tags will allow you to use tag-based controls in your environments. See Tagging your AWS Chatbot resources in the AWS Chatbot Administrator Guide.

Conclusion

In this blog post, I discussed ten features for optimizing DevOps workflows in chat channels. These features will enable you to bring observability to where you collaborate and resolve issues faster. The features described in this blog are free to use. Try out these features and tell us how you intend to use them. Got any ideas to improve AWS Chatbot? You can reach the AWS Chatbot team by typing @aws feedback <your comments> command in your chat channels or by selecting the Feedback link on the AWS Chatbot Console.

About the authors

Abhijit Barde

Abhijit Barde

Abhijit Barde is the Principal Product Manager for AWS Chatbot, where he focuses on making it easy for all AWS users to discover, monitor, and interact with AWS resources using conversational interfaces.

Nakul Rajan

Nakul Rajan

Nakul Rajan is an engineering manager with AWS Chatbot. He has keen interest in building intelligent systems that help AWS customers to interact with their AWS resources in natural language and improve the ChatOps experience for AWS users through AWS Chatbot.