- Newest
- Most votes
- Most comments
Currently you can't directly embed the data you are looking for in a CloudWatch alarm notification. However, as you discovered you can enrich the notification by using your own code in the form of a Lambda. CloudWatch alarms supports SNS as a destination, which is straight forward to connect to a Lambda function.
You can see https://github.com/awslabs/cloudwatch-logs-customize-alarms for an example of how to enrich an Alarm with the log event details. Because each metric filter is unique to a log group, you can take advantage of the "Description" field on the alarm to convey the log group. The description comes across on the notification email.
Here is a blog post that explains the end-to-end process: https://aws.amazon.com/blogs/mt/customize-amazon-cloudwatch-alarm-notifications-to-your-local-time-zone-part-1/
Relevant content
- asked 6 months ago
- asked 4 years ago
- AWS OFFICIALUpdated 12 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago