Get alerted anytime a prefix list gets changed

1

Trying to setup a cloudwatch alert, to go to SNS to email me when a prefix list gets changed. But can't get any data. This is how I had the rule setup:

{ "source": ["aws.ec2"], "detail-type": ["AWS API Call via CloudTrail"], "detail": { "eventSource": ["ec2.amazonaws.com"], "eventName": ["CreateManagedPrefixList", "ModifyManagedPrefixList", "DeleteManagedPrefixList"] } }

is that correct? I think SNS part working, used a test msg and got that email. Seeing "Events FailedInvocations" on the CW monitor

1개 답변
0
수락된 답변

Hello.

I believe what you configured is an EventBridge rule, not a CloudWatch alarm.
And the rules you set will react when "CreateManagedPrefixList", "ModifyManagedPrefixList", and "DeleteManagedPrefixList" occur in CloudTrail.
I tried it in my environment and was able to confirm that emails were sent via SNS.
I think it will take some time for the monitoring of EventBridge rules to be reflected.
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule.html

Try actually creating or deleting a prefix list and recording the API history in CloudTrail.

profile picture
전문가
답변함 6달 전
profile picture
전문가
검토됨 6달 전
  • oh yes, correct it is a evertbridge rule. Will it still work? I checked the cloudtrail logs event history and do see the events when searching for ModifyManagedPrefixList. I tried increasing/decreasing prefix size of an SG.

  • For your test, did u just create a CW alarm or EB? If CW, how did you set it up?

  • I created an EventBridge rule with the rule you shared. I haven't created any CloudWatch alarms. You can send emails using just EventBridge rules and SNS topics.

  • If you look at the actual EventBridge rule screen, the settings will look like the following. a
    b
    c

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

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

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

관련 콘텐츠