I have created a notification rule in CodeBuild to deliver notifications about build errors by e-mail. Unfortunately, the generated emails are just a plaintext email with the body being a truckload of JSON and not, like e.g. Cloudwatch Alerts, a proper human-readable text. What am I doing wrong?
I created the rule and SNS topic using this Terraform code:
resource "aws_sns_topic" "build-monitoring" {
name = "build-monitoring"
}
resource "aws_codestarnotifications_notification_rule" "build-monitoring" {
name = "build-monitoring"
detail_type = "BASIC"
event_type_ids = [
"codebuild-project-build-state-failed",
"codebuild-project-build-state-succeeded",
"codebuild-project-build-state-stopped",
]
resource = aws_codebuild_project.project.arn
target {
type = "SNS"
address = aws_sns_topic.build-monitoring.arn
}
}