Is it possible to configure SNS email subject and body?

0

I would like to receive email notifications when my CodeBuild builds fail via SNS. However I'd like to be able to specify with that subject and body the emails are sent from SNS.

Is this possible (preferably without use of workarounds and other products) and how?

已提問 4 年前檢視次數 5427 次
2 個答案
0

CodeBuild automatically provides the body of the SNS email, that can't be changed without resorting to another AWS service or magic.

To configure the name of the "from" address you need to configure the SNS topic's "Display name" from the "Edit" menu.

It's not configuring the subject or email, but it sort of does the trick.

已回答 4 年前
0

Like @CodingHorror said, it's not really possible to edit the subject and message without using another service.

You can use a lambda function to parse the event i.e. when CodeBuild builds fails and then create a customized message. These docs provide more information.

https://aws.amazon.com/blogs/mt/customize-amazon-cloudwatch-alarm-notifications-to-your-local-time-zone-part-1/

https://aws.amazon.com/premiumsupport/knowledge-center/change-sns-email-for-eventbridge/

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南