AWS for M&E Blog

Creating a custom AWS Elemental MediaTailor metric and Amazon CloudWatch alarm

In a previous blog, we demonstrated how to programmatically access default logs and metrics provided by AWS Elemental MediaTailor. In this post, we will walk through creating our own metric using the MediaTailor log groups that have been made available in Amazon CloudWatch.

At a glance, this is what we will do:

  1. Create an IAM role that gives AWS Elemental MediaTailor access to Amazon CloudWatch.
  2. Test the role by generating MediaTailor logs.
  3. Create an IAM role that our AWS Lambda will need to read from/write to Amazon CloudWatch.
  4. Write an AWS Lambda that will create and update our custom metric.
  5. Subscribe the AWS Lambda to the MediaTailor log groups.
  6. Create an Amazon CloudWatch alarm based on the metric created.

This tutorial assumes you:

  1. Have an AWS account.
  2. Have some familiarity with the AWS console, and the Lambda and CloudWatch services.

Follow the step-by-step tutorial here.