Search code examples
amazon-web-servicesamazon-snsamazon-cloudwatch

Customize alarm message from AWS Cloudwatch


I got some alarm notifications from AWS Cloudwatch to my email but they are usually sent in a JSON format and the problem is that some of those emails are getting received by non-technical people in my company. I was wondering if that is possible to customize the emails sent by AWS SNS because I don't see any option in how to customize it.


Solution

  • If you are using Cloudwatch/Event/Rules then you can use "Input transfomer" to customize the contents of the email and then SNS will send that instead of JSON.

    I am using this setup to get notified when user signs in AWS console. In my case "Event Source" is "AWS Console Sign-in" but you can try with Cloudwatch and see if that gets you what you need.

    See the screenshot, hope it helps.

    https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatch-Events-Input-Transformer-Tutorial.html

    https://forums.aws.amazon.com/thread.jspa?messageID=820808

    enter image description here