

A CloudWatch Scheduled Rule triggers a Lambda function every 60 seconds to query the AWS Health Organizational View API.A webhook URL is entered into an AWS CloudFormation template that is then encrypted using AWS KMS.The following diagram illustrates the workflow used to query the AWS Health API and posts to Amazon Chime or Slack. The webhook URL is encrypted via a second Lambda function using AWS Key Management Service, and is only decrypted when posting to Amazon Chime or Slack. If there is a new event or an existing event has been updated, the Lambda function posts the event to an Amazon Chime room or a Slack channel using the webhook URL. The Lambda function verifies if the AWS Health Event is new or has been updated by comparing the event’s last updated time with entries in an Amazon DynamoDB table. The described solution uses an Amazon CloudWatch Scheduled Rule which triggers an AWS Lambda function to check the AWS Health Organizational View API every 60 seconds. If there is an ongoing AWS Health issue, the issue updates its status-such as open, investigating, or closed-throughout the event. LastUpdatedTime is the last time a Health event ARN was updated by AWS.It is presented in the following format: arn:aws:health:region::event/SERVICE_ISSUE_ID.

