AWS for M&E Blog

AWS Elemental MediaLive Reservation Management: A Data-Driven Approach

The need for organizations and users to stream video to TVs, set-top-boxes, mobile viewers and websites is growing. As video streaming demands are surging, and so are costs. This blog walks you through visualizing and improving Amazon Web Services (AWS) Elemental MediaLive reservation utilization by creating an Amazon QuickSight dashboard using AWS Cost and Usage Report (AWS CUR) data and Amazon Athena.

AWS Elemental MediaLive is a fully managed service that makes it straightforward to create live and linear video streams for broadcast and over-the-top delivery. MediaLive offers a Workflow Wizard to help create a live streaming workflow with just a few clicks. As the usage of MediaLive increases, effectively managing the associated costs becomes crucial.

To optimize costs, AWS offers MediaLive reservations, which can save customers up to 70% compared to on-demand pricing. These reservations cover input processing, output processing, and add-ons features, and require a 12-month commitment. MediaLive Reservations can be purchased through the AWS Console or through an API with the ability to backdate the purchased reservation within the month of purchase.

A common question from customers is how to efficiently track their purchased MediaLive reservations. They want to verify these reservations are being fully utilized. Tracking utilization is crucial. It ensures customers are getting maximum value from their purchases and can make informed decisions for future needs. Underutilized reservations represent wasted spend. On the other hand, fully utilized reservations may indicate the need for additional capacity.

By visualizing MediaLive reservations utilization over time, customers can optimize their reservation investments. They can align them with actual usage patterns, and make better informed decisions about their future reservation requirements.

Prerequisites

The following needs to be in place before attempting the solution:

Solution

Create an Amazon Athena Database for the AWS CUR data

If this is the first time you are using AWS CUR data with Athena, you will need to create the Athena database and table with AWS CUR data. To do this follow either of the ensuing steps:

· Use AWS CloudFormation (recommended) to integrate AWS CUR with Athena.

or

· Follow the approach of manually creating Athena Tables. You will need to do this step at least once a month as the table only includes data from the current AWS CUR.

Create an Amazon Athena view of AWS CUR data for querying the information

Create Athena views using the AWS CUR data. An Athena view is a logical table, which let users save SQL queries as virtual tables that pull the latest data from underlying sources each time they’re queried.

  1. To create the “eml_summary_view” view, copy the SQL query from CUR Query Library (MediaLive Reservation Utilization) in the Athena editor.
  2. The query contains ${table_name} as the placeholder which must be replaced before a query will run. For example, if your CUR table is called cur_table and is in a database called cur_db, you would replace ${table_name} with cur_table.
  3. Add the following statement to the beginning of the query and hit run.

CREATE OR REPLACE VIEW "eml_summary_view" AS

Amazon Athena query editor interface showing SQL code to create a view named "eml_summary_view". The code includes a "CREATE OR REPLACE VIEW" statement at the top, followed by a complex query for analyzing AWS Elemental MediaLive reservation utilization data from the AWS Cost and Usage Report.

Figure 1: Creating an Amazon Athena View.

This view will provide the necessary data to build the QuickSight dashboard and visualize the utilization of MediaLive reservations over time.

Configure Amazon QuickSight to access the Amazon Athena view

Next, to access the Athena view in Amazon QuickSight, Create a QuickSight DataSet using Amazon Athena Views.

  1. Add “eml_summary_view” view from Amazon Athena views to Amazon QuickSight as the datasets.
Amazon QuickSight interface showing Catalog, Database and Table to select for your CUR database highlighted in red to be selected for adding the “eml_summary_view" as the QuickSight DataSet.

Figure 2: Adding Amazon Athena View as the Amazon QuickSight Dataset.

  1. Select “Query mode” as SPICE. Click PUBLISH & VISUALIZE, this is will create a new QuickSight Analysis.
Amazon QuickSight Dataset preparation interface showing options highlighted in red to publish and visualize the dataset as analysis as mentioned in the steps.

Figure 3: Preparing Amazon QuickSight Dataset for visualization.

  1. Once the dataset is added, add the refresh schedule, so the dataset receives new data from the AWS CUR. It is highly recommended to refresh the dataset daily or weekly for a better visualization experience.
Amazon QuickSight Dataset interface showing options highlighted in red to refresh the dataset as mentioned in the steps.

Figure 4: Adding automatic refresh schedule for the Amazon QuickSight Dataset.

Create Visuals of your AWS Elemental MediaLive Reservation

Now that we have added the dataset, we are going to add visuals to the newly opened analysis. QuickSight Analysis is a feature within Amazon QuickSight that allows users to create interactive visualizations and perform data analysis on datasets. It enables users to explore data through charts, tables, and dashboards, offering insights with filtering, calculations, and custom views.

Follow these steps to add visuals to the analysis:

  1. Start from the Analysis page, we’ll add a “Reservation Utilization” visual
    1. In the left sidebar, click Add button in the “Visuals” section
    2. Select Table as the visual type.
    3. In the “Data” column make sure you have eml_summary_view selected (Figure 5)
    4. In the field list, select reservation id (or you can choose line_item_usage_type) and ri utilization (%)
    5. Change “ri utilization (%)” to average by using field well
      1. Optionally, this visual can be sorted by ri utilization (%)
Amazon QuickSight Analysis interface showing options highlighted in red to add “Reservation Utilization” visual as explained in the steps.

Figure 5: Amazon QuickSight Visual for AWS Elemental MediaLive Reservation.

  1. Staying on the same Analysis page, we’ll add a “MediaLive Reservation Utilization (WoW)” visual
    1. Click Add in the “Visuals” section again
    2. Select Line Chart as the visual type
    3. In the “Data” column make sure you have eml_summary_view selected
    4. In the field list, select line_item_usage_start_date, reservation id and ri utilization (%)
    5. Aggregate “line_item_usage_start_date”, by Week and aggregate “ri utilization (%)” to average by using field well
Amazon QuickSight Analysis interface showing options highlighted in red to add “MediaLive Reservation Utilization (WoW)” visual as explained in the steps.

Figure 6: Amazon QuickSight Visual for AWS Elemental MediaLive Reservation Utilization.

3. Continuing on your Analysis page, we’ll add a “MediaLive Reservation Inventory” visual

    1. Add another visual by clicking Add in the “Visuals” section
    2. Select Table as the visual type
    3. In the “Data” column make sure you have eml_summary_view selected
    4. In the field list, select reservation id, reservation_start_time, reservation_end_time, line_item_usage_type, line_item_line_item_description, line_item_usage_end_date, count of reservation purchased and ri utilization (%)
    5. Aggregate “line_item_usage_end_date” by Max, “count of reservation purchased” by Min and aggregate “ri utilization (%)” to average by using field well
Amazon QuickSight Analysis interface showing options highlighted in red to add “MediaLive Reservation Inventory” visual as explained in the steps.

Figure 7: Amazon QuickSight Visual for AWS Elemental MediaLive Reservation Inventory.

After successfully following the previous steps, you will have an analysis created as shown in Figure 8. You can publish as a dashboard and share with the responsible personas to analyze the spend and utilization of the MediaLive reservations.

Sample table and line chart of the Amazon QuickSight Analysis interface after adding the visuals.

Figure 8: Amazon QuickSight Analysis for AWS Elemental MediaLive Reservation.

The combination of the MediaLive reservation inventory table and the MediaLive Reservation Utilization line chart provides a comprehensive view of your reservation usage. The table gives you a high-level summary of your reservation inventory and utilization, while the line chart allows you to analyze the utilization trends over time. Together, these visuals will help you optimize your MediaLive reservation investments and verify you are getting the most value from your reserved capacity.

To make this dashboard interactive, you can add one-click interactive filter actions on fields and apply conditional formatting on entire rows. For example, you can select one of the reservation IDs to show only data related to that ID on the dashboard or you can color code entire table rows based on utilization percentages.

Sample of the Amazon QuickSight Analysis interface after applying conditional formatting and filter action to just one row.

Figure 9: Amazon QuickSight Analysis with additional formatting.

Conclusion

By following the steps in this solution, you can effectively track the utilization of your AWS Elemental MediaLive Reserved Instances using the AWS Cost and Usage Report and Amazon QuickSight. This information can help you optimize your reservation purchases, verifying that you are getting the expected return on your investments, and making informed decisions about future reservation needs.

The dashboard created in this solution provides a powerful tool for visualizing and analyzing your MediaLive Reservation utilization. However, this is just the starting point—you can further customize the dashboard, add additional visuals, and integrate other data sources to suit your specific requirements.

Contact an AWS Representative to know how we can help accelerate your business.

Further Reading

Krutarth Doshi

Krutarth Doshi

Krutarth Doshi is a Senior Technical Account Manager at AWS with over 10 years of experience, specializing in supporting Independent Software Vendor (ISV) customers for the past two years. He excels in developing custom solutions for Cost and Usage Report (CUR) queries and visualize them with QuickSight, focusing on solving complex technical challenges.