Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capturing AWS Glue Event in Cloud watch

I have created one AWS Cloud watch Rule where I have defined the following event pattern. To capture the AWS Glue Job and keep an entry in SQS Queue.

{
  "source": [
    "aws.glue"
  ],
  "detail-type": [
    "Glue Job State Change"
  ],
  "detail": {
    "state": [
      "Succeeded"
    ],
    "jobName": [
      "GlueJobName"
    ]
  }
}

I ran my Glue job manually or by using trigger in Glue console I could see the job status as succeeded but there is no SQS entry generated by Cloud watch, which means the Glue status Job change event is not captured in cloud watch. Can any one help on this? Anything wrong with what we are doing? Our idea is to keep a SQS Entry each time when Glue job runs, and read the SQS to trigger the Schedular.

I have created one AWS Cloud watch Rule where I have defined the following event pattern. To capture the AWS Glue Job and keep an entry in SQS Queue.

like image 804
rohith Avatar asked Jan 29 '23 08:01

rohith


1 Answers

Use the following rule, it should work. No need to add account and region fields. I think primary reason why it wasn't working was because the state 'SUCCEEDED' was in lowercase.

{
  "source": [
    "aws.glue"
  ],
  "detail-type":[
    "Glue Job State Change"
  ],
  "detail": {
    "state": [
      "SUCCEEDED"
    ],
    "jobName": [
        "GlueJobName"
    ]
  }
}
like image 184
Akshat Avatar answered Feb 07 '23 15:02

Akshat