Skip to content

Latest commit

 

History

History

chime-notifier

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

AWS Health Chime Notifier

Description

This tool can be used to post alerts to a Chime room when AWS Health events are generated by using AWS Lambda and Amazon CloudWatch Events. The message will contain the latest event description and a link to the AWS Health Console; e.g. "Event Description https://phd.aws.amazon.com/phd/home?region=us-east-1#/event-log?eventID=arn:aws:health:us-west-2::event/AWS_EVENT_ID".

Chime Setup

Follow these steps to configure the webhook in Chime:

  1. Click the cog wheel from your Chime room

  2. Select "Manage WebHooks".

  3. Create Webhook

  4. Copy the webhook URL and use it as the value for the HookURL parameter in the Cloudformation template.

Security Note: WebHooks should be treated like passwords and should not be shared publicily.

AWS setup using CloudFormation

CloudFormation

Choose Launch Stack to launch the template in the US East (N. Virginia) Region in your account.

Launch AWS Health Chime Notifier

The CloudFormation template requires the following parameter:

HookURL - Incoming web hook url from Slack setup.

AWS Manual Setup

  1. Create an IAM role for the Lambda function to use. Attach the IAM policy to the role in the IAM console.

Documentation on how to create an IAM policy is available here: http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html Documentation on how to create an IAM role for Lambda is available here: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html#roles-creatingrole-service-console

  1. Create a Lambda Python function by using the sample provided and choose the IAM role created in step 1. Add an enviroment variable with key CHIMEWEBHOOK and the webhook URL from the Chime setup above as value.

More information about Lambda is available here: http://docs.aws.amazon.com/lambda/latest/dg/getting-started.html

  1. Create a CloudWatch Events rule to trigger the Lambda function created in step 2 for AWS Health events.

Documentation on how to create an AWS Health CloudWatch Events rule is available here: http://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html

More information about AWS Health is available here: http://docs.aws.amazon.com/health/latest/ug/what-is-aws-health.html

Note that this is a just an example of how to set up automation with AWS Health, Amazon CloudWatch Events, and AWS Lambda. We recommend testing the example and tailoring it to your environment before using it in your production environment.

You can also test the Lambda function by invoking it manually and using a sample AWS Health event data.

License

AWS Health Tools are licensed under the Apache 2.0 License.