This serves as README for the blogpost Monitor and automate Amazon EUC with AWS Chatbot on the AWS Desktop and Application Streaming channel.
- AWS account with access to the console and CLI and permissions to create CloudFormation stacks, Lambda functions, SNS topics, IAM roles, IAM policies, and CloudWatch alarms.
- Microsoft Teams or Slack information.
- To configure a Slack chat client,
follow the instructions in Step 1: Setting up AWS Chatbot with Slack. https://docs.aws.amazon.com/chatbot/latest/adminguide/slack-setup.html
- Follow steps 1 to 5.
- Add AWS Chatbot to the Slack channel by following step 14.
- To configure a Microsoft Teams client, follow the instructions in Step 1: Setting up AWS Chatbot with Microsoft Teams. https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup
- Follow steps 1 to 5.
- Add AWS Chatbot to your team by following step 14.
- Create Lambda deployment packages by creating zip archives of the four python files in the source directory.
- Download the four python and the yaml file in the source directory https://github.com/aws-samples/aws-chatbot-for-end-user-computing/tree/main/source
- Create zip archives of the four python files.
zip chatbot_cost_explorer01.py.zip chatbot_cost_explorer01.py && zip chatbot_launchtime_checks01.py.zip chatbot_launchtime_checks01.py && zip chatbot_unhealthy_workspace_checks01.py.zip chatbot_unhealthy_workspace_checks01.py && zip chatbot_workspace_latency_checks01.py.zip chatbot_workspace_latency_checks01.py
- The zip archives must be named as chatbot_cost_explorer01.py.zip, chatbot_launchtime_checks01.py.zip, chatbot_unhealthy_workspace_checks01.py.zip and chatbot_workspace_latency_checks01.py.zip.
- Create an S3 bucket in the EUC account and upload zip archives you created in the previous step along with the chatbot.yaml file. The files should appear in the bucket as S3BucketName/chatbot_cost_explorer01.py.zip.
- Take note of the S3 Object URL of the chatbot.yaml cloudformation template and the name of the bucket. For example: https://BucketName.s3.Region.amazonaws.com/chatbot.yaml
- In the EUC AWS account, navigate to the CloudFormation console and create a new stack using the S3 Object URL of the chatbot.yaml file and the S3 bucket name.
- The required resources for the Chatbot service, such as the SNS topic, IAM role, IAM policy, and Lambda functions, will be created.
The template creates the following resources:
Resource Name | Type |
---|---|
ChatbotServicePolicy | AWS::IAM::ManagedPolicy |
ChatbotServiceRole | AWS::IAM::Role |
EUCChatbotExecutionRole | AWS::IAM::Role |
EUCChatbotTopic | AWS::SNS::Topic |
LatencyCheckFunction | AWS::Lambda::Function |
LaunchTimeCheckFunction | AWS::Lambda::Function |
UnHealthyWorkSpacesCheckFunction | AWS::Lambda::Function |
CurrentEUCBillCheckFunction | AWS::Lambda::Function |
This solution creates an IAM role and policy for the AWS chatbot to interact with resources in your account. Please review and make amendments to IAM and guardrail policies if required to adhere to your organisation's security posture. Refer https://docs.aws.amazon.com/chatbot/latest/adminguide/understanding-permissions.html
This library is licensed under the MIT-0 License. See the LICENSE file.