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
asked 9 months ago154 views
1 Answer
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 picture
EXPERT
Uri
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions