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
gefragt vor 2 Jahren872 Aufrufe
1 Antwort
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
EXPERTE
Uri
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen