Publish an AWS Health event formatted as a Slack API chat.postMessage message to an SNS topic. This currently supports AWS Health notifications and not issues because issues are not sent as aws.health events.
This is intended to be used with aws-sns-to-slack-publisher
- Event Type: AWS CloudWatch Event - Health Event
- Event Message: The message shape may be found here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#health-event-types
Example event:
{
"version": "0",
"id": "7bf73129-1428-4cd3-a780-95db273d1602",
"detail-type": "AWS Health Event",
"source": "aws.health",
"account": "123456789012",
"time": "2016-06-05T06:27:57Z",
"region": "%%region%%",
"resources": [],
"detail": {
"eventArn": "arn:aws:health:%%region%%::event/%%id%%",
"service": "service",
"eventTypeCode": "AWS_%%service_code%%",
"eventTypeCategory": "%%category%%",
"startTime": "Sun, 05 Jun 2016 05:01:10 GMT",
"endTime": "Sun, 05 Jun 2016 05:30:57 GMT",
"eventDescription": [{
"language": "%%lang-code%%",
"latestDescription": "%%description%%"
}]
...
}
}
This application is intended to be deployed using AWS Serverless Application Repository. However, Serverless Framework is also supported.
- AWS Serverless Application Repository: aws-health-event-publisher
$ npm install -g serverless
$ npm install
$ serverless deploy -v
- ${AWS::StackName}-HealthEventSnsTopicArn: AWS SNS topic ARN where health events are published to.