Step 2: Specify an event source in a CloudWatch Events rule - MediaConvert

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.


                        This CloudWatch Events rule brings together a job event that has an error and an
                            Amazon SNS topic. The CloudWatch Events rule is represented by a rectangle that reads
                            "Rule: Send me an email when one of my jobs has an error." Inside that
                            rectangle are two rectangles, one representing the target and one
                            representing the event source. In this image, the event source rectangle
                            is highlighted. It reads "Event Source: AWS Elemental MediaConvert says
                            one of my jobs has an error."

To set up an event source in a CloudWatch Events rule

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Events, and then choose Create rule.

  3. 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.

  4. 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.