Create AWS Glue CloudWatch Events Cloudwatch Alarm - isgaur/AWS-BigData-Solutions GitHub Wiki

Creating a rule in CloudWatch Events by following the below steps:

Steps to follow:

  1. Create SNS Topic:

    Go to AWS Console: https://console.aws.amazon.com/

    From the Services tab, click on SNS

    Go to Topics

    Click on Create Topic

    Give a name to the topic. Provide a display name and click on Create Topic.

    The topic is created. Further we need to add a subscription to this topic. On the topic page, scrolling down would show Create Subscription.

    On the Subscription page, Select the Protocol as E-mail and endpoint should be the email address to which one wish to send the notification. Further Click on subscription.

    When one add the subscription, the particular subscriber needs to confirm the subscription by going to the mailbox where a SNS notification will be sent to confirm the subscription. After clicking on confirm Subscription the email is subscribed.

  2. Create CloudWatch Event Rule:

    Go to AWS Console: https://console.aws.amazon.com/

    From the Services tab, click on CloudWatch

    Go to Events Rules

    Click on Create Rule

    Check Event Pattern

    Select Service Name as 'Glue' and Event Type as 'Glue Crawler State Change'

    Check on Specific State(s) and select 'Failed'.

    In Targets Select SNS topic ->Select topic which one created in previous step.

    Click on Configure Details Enter Name and any description for the Rule Keep state 'enabled'

    Click on Create Rule

Repeat step 2 and select Event Type as 'Glue Job State Change' for Glue Jobs notification. But make sure one add the state 'Failed' manually be editing the Event pattern because the Specific State(s) option is not available for Glue Jobs currently.

one can take reference from 'Event Pattern Preview' of 'Glue Crawler State Change' configuration which one would do in step 2. Further, one can select the same SNS topic in targets which one configured in step 1 to get email notification.