- 新しい順
- 投票が多い順
- コメントが多い順
Hi, it is not possible to enrich or modify the initial alarm notification. In most cases, users who are looking for a way to enrich or customize the notification use a lambda to forge the notification output format they want. Then there are 2 strategies to trigger the lambda:
- catch Eventbridge events and leave the alarm actions blank
- configure alarm actions to post a state change notification to an SNS topic, subscribe the lambda to that topic - note that in that case the Lambda ought to post its output to a different SNS topic
The 1st strategy works well if you need the same lambda to process all alarms in your account, as an event gets posted for every alarm state change, thus triggering your lambda every time. The 2nd strategy might be a better fit if you want to tailor the notification only for a handful of specific alarms. The https://aws.amazon.com/blogs/mt/customize-amazon-cloudwatch-alarm-notifications-to-your-local-time-zone-part-1/ blog post gives an example of strategy 1.
For what you are looking to do, you'd likely need to parse the event to retrieve an id (e.g. the instance id of an EC2), then place a call to the API to fetch the metadata you're looking for.
Would that approach work for your case?
関連するコンテンツ
- 質問済み 10ヶ月前
- AWS公式更新しました 1年前
- AWS公式更新しました 2年前