Option 1: Send all MediaLive events to an email address
This option shows how to set up to send all events to a single email address. The drawback of this setup is that the email account will receive a large volume of emails. Therefore, we recommend that you don't use this setup in a production environment.
You must perform the following procedure in each Region where channels or multiplexes are running.
Create a subscription
Create a subscription to set up a specific email address so that it automatically receives email notifications when any event occurs in MediaLive. You must identify an email recipient for the emails.
In the following procedure, we use the example of "MediaLive_alert" as the subject line and "MediaLive" as the sender of the email. We create the subscription using the Amazon Simple Notification Service (Amazon SNS) console.
To create a subscription for email notifications (Amazon SNS console)
-
Sign in to the AWS Management Console and open the Amazon SNS console at https://console.aws.amazon.com/sns/v2/home
. -
In the navigation pane, choose Topics, and then choose Create new topic.
-
In the Create new topic dialog box, for Topic name, type the name that you want for the subject line of the email, such as
MediaLive_alert. -
For Display name, type the name that you want for the sender of the email, such as
MediaLive. -
Choose Create topic.
-
Amazon SNS creates the topic and displays the ARN in the list of topics. For example,
arn:aws:sns:us-west-2:111122223333:MediaLive, where111122223333is your AWS account. -
Copy this ARN to your clipboard.
-
In the navigation pane, choose Subscriptions, and then choose Create subscription.
-
On the Subscriptions page, choose Create subscription.
-
In the Create subscriptions dialog box, for Topic ARN, type or paste the ARN.
-
For Protocol, choose Email.
-
For Endpoint, type the email address of the recipient. You must be able to log on to this email account because Amazon SNS sends a confirmation email to this address.
-
Choose Create subscription.
Amazon SNS sends a confirmation email to the address that you specified.
-
Log on to that email account, and display the email. Choose the "Confirm subscription" link in the email to enable the subscription. A confirmation window appears in a web browser. You can close this window.
Create a rule
You now create a rule in Amazon EventBridge that says, "When
EventBridge receives any event from
aws.medialive, invoke the specified SNS
topic." In other words, you create a rule that sends an
email to the subscribed email address.
To create a rule (EventBridge console)
-
Open the EventBridge console at https://console.aws.amazon.com/events/
. -
In the navigation pane, choose Rules, and then choose Create rule.
-
Enter a Name and optional description for the rule.
-
For Event bus, keep the default event bus selected.
-
For Rule type, choose Rule with an event pattern, and then choose Next.
-
For Creation method, choose Custom pattern (JSON editor).
-
In the Event pattern box, enter the following:
{ "source": [ "aws.medialive" ] } -
Choose Next.
-
For Target type, choose AWS service.
-
For Select a target, choose SNS topic.
-
For Topic, choose the topic that you created, for example,
MediaLive_alert. -
Choose Next, configure optional tags, and then choose Next again.
-
Review the rule details and choose Create rule.
Now, whenever an alert occurs in MediaLive, an event will be sent to EventBridge. This event will trigger the rule that sends an email to the email address that you specified in the SNS subscription.