Eventbridge schema

0

I have many glue jobs with similar job names, and I'm using Eventbridge to monitor these jobs, once a job failed, trigger lambda to send email.

below is current schema, there're too many glue jobs, the length of json exceeded the limit, so I have to create 2 rules to cover all the jobs.

Q: can I use regular expression in "jobName" ? or can I use another parameter instead of "jobName" to filter glue jobs?

{
  "detail-type": ["Glue Job State Change"],
  "source": ["aws.glue"],
  "detail": {
    "jobName": ["glue_job_1", "glue_job_2", "glue_job_3", "glue_job_4", "glue_job_5".....],
    "state": ["FAILED"]
  },
  "region": ["ap-southeast-1"],
  "account": ["xxxxxxxx"]
}

Thanks for your answer!

Cloud
已提问 2 年前841 查看次数
1 回答
0

First, if you do not need the job name, you can remove it from the rule. If you do need you can use a Prefix to catch all the job names that starts with some text, e.g., "jobName": [ {"prefix": "glue_job_" } ].

You can find more information about the available event patterns here.

profile pictureAWS
专家
Uri
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则