本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
DataBrew 使用 CloudWatch 事件自动化
Amazon CloudWatch Events 使您能够实现 AWS 服务自动化,并自动响应系统事件,例如应用程序可用性问题或资源更改。来自 AWS 服务的事件几乎实时地传递到 CloudWatch 活动。您可以编写简单规则来指示您关注的事件,并指示要在事件匹配规则时执行的自动化操作。可自动触发的操作包括:
调用 Amazon EC2 运行命令
将事件中继到 Amazon Kinesis Data Streams
激活 AWS Step Functions 状态机
通知亚马逊SNS主题或亚马逊队列 SQS
DataBrew 每当您的 AWS 账户中的资源状态发生变化时,都会向 Events 报告 CloudWatch 事件。尽最大努力发出事件。
以下是几个事件的示例,显示了 DataBrew 作业的不同状态:SUCCEEDED
FAILED
、TIMEOUT
、和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" } }
有关更多信息,请参阅 Amazon CloudWatch 活动用户指南。