Search code examples
gitamazon-web-servicesamazon-snsamazon-sesaws-codecommit

AWS Code Commit Simple Notification Service: is there a way to get better formatted notification email? Or attach SES to Code Commit?


At the moment our team is getting AWS SNS messages regarding pull requests, branch changes etc as JSON embedded in an email, which means, without line-breaks, etc, a JSON structure wrapped to the width of the mail message. That's OK, but makes it difficult for people to read at a glance what's occurred, and, thus, easy to ignore. Is there a way to have it arrive better formatted? I looked through the SNS options and did some googling and found this -- Sending html content in AWS SNS(Simple Notification Service) emails notifications -- which says that Simple Email Service is a better option. How might I attach this to Code Commit events?


Solution

  • Cloudwatch Events Input Transformer can be used to convert event data in Json format to a more readable format.

    The sample rule below matches the fields of CodeCommit:pullRequestCreated event and transforms it to a readable notification message.

    enter image description here