Step 2: Specify an event source in a CloudWatch Events rule
Next, specify your event source in a CloudWatch Events rule to capture only events that
are generated by a job status that changes to ERROR
.

To set up an event source in a CloudWatch Events rule
Open the CloudWatch console at https://console.amazonaws.cn/cloudwatch/
. -
In the navigation pane, choose Events, and then choose Create rule.
-
In the Event Source section, choose Event Pattern, and then choose the element labeled Build event pattern to match events by service. From the resulting dropdown list, choose Custom event pattern.
-
In the Build custom event pattern box, replace the existing code with the following code:
{ "source": [ "aws.mediaconvert" ], "detail": { "status": [ "ERROR" ] } }
This code defines a CloudWatch Events event rule that matches any event where the job status changes to
ERROR
. For more information about event patterns, see Events and event patterns in the Amazon CloudWatch User Guide.