Creating event notifications
You can use Amazon CloudWatch Events and Amazon Simple Notification Service (Amazon SNS) to notify you of new events. In CloudWatch Events, the rule describes which events you're notified about. In Amazon SNS, the topic describes what kind of notification you receive. This section provides high-level steps for creating a topic and rule for events from AWS Elemental MediaPackage. For detailed information about topics and rules, see the following:
-
Create a topic and Subscribe to a topic in the Amazon Simple Notification Service Developer Guide
-
Getting started with Amazon CloudWatch Events in the Amazon CloudWatch Events User Guide
To create notifications of CloudWatch events
-
Access Amazon SNS
and create a topic. Give the topic a descriptive name that you will later recognize. -
Subscribe to the topic that you just created. Choose what kind of notification you want to receive, and where that notification is sent. For example, for email notifications, choose the Email protocol and enter the email address to receive notifications for the endpoint.
-
Access CloudWatch Events
and create a rule that uses a Custom event pattern. In the pattern preview space, enter the following: { "source": [ "aws.mediapackage" ], "detail-type": [ "
detail-type from event
" ] }For
detail-type
, enter the value for thedetail-type
field from the event. You can use the following values for detail-type:-
MediaPackage Input Notification
-
MediaPackage Key Provider Notification
For information about the event types, see AWS Elemental MediaPackage events.
The following example rule creates notifications for all events on all detail-types.
{ "source": [ "aws.mediapackage" ], "detail-type": [ "MediaPackage Input Notification", "MediaPackage Key Provider Notification", "MediaPackage HarvestJob Notification" ] }
-
-
Add a target to the rule that you just created. Choose SNS topic, and then choose the topic that you created in step 1.
-
Configure the details of the rule, and give it a descriptive name. To start using the rule, make sure it's enabled, and then save it.