简体   繁体   English

AWS Glue 工作流在任何 ETL 作业失败时触发 email

[英]AWS Glue Workflow to trigger email on any ETL job failure

In AWS Glue, I am executing a couple of ETL jobs using workflow, Now I want to inform business via email on the failure of any of the ETL jobs.在 AWS Glue 中,我正在使用工作流执行几个 ETL 作业,现在我想通过 email 通知业务任何 ETL 作业的失败。 I need help to get name of failed job and pass it to job which would trigger an email.我需要帮助来获取失败作业的名称并将其传递给会触发 email 的作业。

Step 1: Create atopic in Amazon SNS , with Protocol as Email as well as Create subscription and confirm subscription步骤 1:在 Amazon SNS 中创建主题,协议为 Email 以及创建订阅并确认订阅

Step 2: Create new CloudWatch Events rule with following custom event pattern under Event Source section;第 2 步:在事件源部分下使用以下自定义事件模式创建新的CloudWatch Events 规则

{
  "source": [
    "aws.glue"
  ],
  "detail-type": [
    "Glue Job Run Status"
  ],
  "detail": {
    "state": [
      "FAILED",
      "ERROR",
      "TIMEOUT"
    ]
  }
}

Step 3: For Cloud Watch Event Rule, under the Targets section, choose Add targets, and then change the default Lambda function to SNS topic and choose name of SNS topic created in Step 1. Finish creation of this CloudWatch event rule.第 3 步:对于 Cloud Watch Event Rule,在 Targets 部分下,选择 Add targets,然后将默认 Lambda function 更改为 SNS 主题,并选择在第 1 步中创建的 SNS 主题的名称。完成此 CloudWatch 事件规则的创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM