Automating DataBrew with CloudWatch Events - Amazon Glue DataBrew
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Automating DataBrew with CloudWatch Events

Amazon CloudWatch Events enables you to automate your Amazon services and respond automatically to system events such as application availability issues or resource changes. Events from Amazon services are delivered to CloudWatch Events in near-real time. You can write simple rules to indicate which events are of interest to you, and what automated actions to take when an event matches a rule. The actions that can be automatically triggered include the following:

  • Invoking the Amazon EC2 run command

  • Relaying the event to Amazon Kinesis Data Streams

  • Activating an Amazon Step Functions state machine

  • Notifying an Amazon SNS topic or an Amazon SQS queue

DataBrew reports an event to CloudWatch Events whenever the state of a resource in your Amazon account changes. Events are emitted on a best effort basis.

Following are examples of several events, showing various states of a DataBrew job: SUCCEEDED, FAILED, TIMEOUT, and STOPPED.

{ "version": "0", "id": "abcdef00-1234-5678-9abc-def012345678", "detail-type": "DataBrew Job State Change", "source": "aws.databrew", "account": "123456789012", "time": "2017-09-07T18:57:21Z", "region": "us-west-2", "resources": [], "detail": { "jobName": "MyJob", "severity": "INFO", "state": "SUCCEEDED", "jobRunId": "db_abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789", "message": "Job run succeeded" } } { "version": "0", "id": "abcdef01-1234-5678-9abc-def012345678", "detail-type": "DataBrew Job State Change", "source": "aws.databrew", "account": "123456789012", "time": "2017-09-07T06:02:03Z", "region": "us-west-2", "resources": [], "detail": { "jobName": "MyJob", "severity": "ERROR", "state": "FAILED", "jobRunId": "db_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "message": "AnalysisException: 'Path does not exist: s3://MyBucket/MyFile;'" } } { "version": "0", "id": "abcdef00-1234-5678-9abc-def012345678", "detail-type": "DataBrew Job State Change", "source": "aws.databrew", "account": "123456789012", "time": "2017-11-20T20:22:06Z", "region": "us-east-2", "resources": [], "detail": { "jobName": "MyJob", "severity": "WARN", "state": "TIMEOUT", "jobRunId": "db_abc0123456789abcdef0123456789abcdef0123456789abcdef0123456789def", "message": "Job run timed out" } } { "version": "0", "id": "abcdef00-1234-5678-9abc-def012345678", "detail-type": "DataBrew Job State Change", "source": "aws.databrew", "account": "123456789012", "time": "2017-11-20T20:22:06Z", "region": "us-east-2", "resources": [], "detail": { "jobName": "MyJob", "severity": "INFO", "state": "STOPPED", "jobRunId": "db_abc0123456789abcdef0123456789abcdef0123456789abcdef0123456789def", "message": "Job run stopped" } }

For more information, see the Amazon CloudWatch Events User Guide.