概要
- CloudWatchのアラームをSlackへ通知します。
- CloudWatch => SNS => Lambda (with KMS) => Slack webhook という流れ。
![](https://blog.teraren.com/wp-content/uploads/2020/04/image-2-1024x751.png)
Blueprint通りに設定すればほぼ動きますが、一部ちょっと変更が必要だったのでメモっておきます。
Blueprintはこちら。cloudwatch-alarm-to-slack-python
![](https://blog.teraren.com/wp-content/uploads/2020/04/image-1-1024x529.png)
AWS lambdaのコード
変更後
Blueprintからの差分
![](https://github.githubassets.com/assets/github-octocat-13c86b8b336d.png)
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over...
テストのために、CroudWatchのイベントテンプレがあるのですが、そちらとの整合性も取れていません。CroudWatchのイベントを少し変更します。変更後のファイルはこちら。
Comments