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:
- Create an IAM role that gives AWS Elemental MediaTailor access to Amazon CloudWatch.
- Test the role by generating MediaTailor logs.
- Create an IAM role that our AWS Lambda will need to read from/write to Amazon CloudWatch.
- Write an AWS Lambda that will create and update our custom metric.
- Subscribe the AWS Lambda to the MediaTailor log groups.
- Create an Amazon CloudWatch alarm based on the metric created.
This tutorial assumes you:
- Have an AWS account.
- Have some familiarity with the AWS console, and the Lambda and CloudWatch services.
Follow the step-by-step tutorial here.