Score:0

How to build event pattern for cloudwatch->Events->Rules?

in flag

Does anyone know how to build a proper "event pattern" in AWS Cloudwatch->Events->Rules?

I am trying to send events that exist in a particular AWS CloudWatch Log group to SNS topic. The problem is - I can't define a proper "event pattern". The AWS Console creates this "event pattern" which does not work:

{
  "source": [
    "aws.logs"
  ]
}

I can get the logs manually by running this command, but I do not know how to convert that into proper "event pattern" for CLoudWatch Event Rule:

aws logs filter-log-events --log-group-name /aws/eks/foobar/cluster \
 --start-time 1623117604605 --filter-pattern \
"{$.apiVersion = \"audit.k8s.io/v1\" && $.objectRef.subresource = exec }"

Thanks!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.