Is is possible to alter the email notifications sent via SNS from Cloudwatch alarms?

1

Customer has used the prescriptive CIS benchmarks document to set up some Cloudwatch alarms:

https://www.cisecurity.org/benchmark/amazon_web_services/

The issue they are having is that the alarm emails that are sent out via SNS are not particuarly useful. They'd like to include more context about the event so they don't have to go hunting for details manually. Here's an example alert (truncated):

    Alarm Details:
    - Name:                       IAM Policy Changes
    - Description:                Amazon CloudWatch alarm that is triggered when an API call is made to change an IAM policy.
    - State Change:               INSUFFICIENT_DATA -> ALARM
    - Reason for State Change:    Threshold Crossed: 1 out of the last 1 datapoints [2.0 (17/12/19 03:24:00)] was greater than or equal to the threshold (1.0) (minimum 1 datapoint for OK -> ALARM transition).
    - Timestamp:                  Tuesday 17 December, 2019 03:29:42 UTC
    - AWS Account:                XXXXXXXXXXXX

The alert shows that an IAM policy changed, but doesn't show:

  • which policy changed, or
  • what the change was.

Is there a way to change the alert or notification to include more data?

1개 답변
1
수락된 답변

Can you confirm the customer is taking the approach outline here? Essentially the solution to the question you're posing is alarm enrichment and typically that happens by additional plumbing that queries the resource(s) in question. As a CloudWatch alarm is just that (an alarm) based off a predefined metric, getting enrichment data directly would be challenging. The metric is simply counting how many times specific eventNames occur in your log group.

To get more detail (without doing enrichment), it seems like a Config rule sending data via a Event Bridge/CloudWatch Event Rule that triggers a Lambda function and/or SNS topic may yield the information the customer wants? There is a slightly dated by still useful walk-through here.

AWS
전문가
Frank_P
답변함 4년 전
profile picture
전문가
검토됨 24일 전
  • Adding a host of links to read defeats the whole purpose of the Q&A forum. Adding an example will surely help.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠