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:
- To visualize MediaLive reservation utilization, you will need appropriate permissions to access AWS CUR, Athena and QuickSight. You should follow the least privilege model when using AWS Identity and Access Management (IAM), refer to the IAM security best practices documentation and conduct your own due diligence when setting this up.
- Enable AWS CUR, if not enabled. For instructions read: Creating Cost and Usage Reports.
- The AWS CUR granularity has to be hourly to implement this solution.
- Set up Athena to analyze the data from your S3 bucket holding AWS CUR data. For instructions read: Querying Cost and Usage Reports using Amazon Athena.
- Set up QuickSight to visualize the data from your Athena view. For instructions read: Setting up for Amazon QuickSight.
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.
- To create the “eml_summary_view” view, copy the SQL query from CUR Query Library (MediaLive Reservation Utilization) in the Athena editor.
- 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.
- Add the following statement to the beginning of the query and hit run.
CREATE OR REPLACE VIEW "eml_summary_view" AS
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.
- Add “eml_summary_view” view from Amazon Athena views to Amazon QuickSight as the datasets.
- Select “Query mode” as SPICE. Click PUBLISH & VISUALIZE, this is will create a new QuickSight Analysis.
- 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.
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:
- Start from the Analysis page, we’ll add a “Reservation Utilization” visual
- In the left sidebar, click Add button in the “Visuals” section
- Select Table as the visual type.
- In the “Data” column make sure you have eml_summary_view selected (Figure 5)
- In the field list, select reservation id (or you can choose line_item_usage_type) and ri utilization (%)
- Change “ri utilization (%)” to average by using field well
- Optionally, this visual can be sorted by ri utilization (%)
- Staying on the same Analysis page, we’ll add a “MediaLive Reservation Utilization (WoW)” visual
- Click Add in the “Visuals” section again
- Select Line Chart as the visual type
- In the “Data” column make sure you have eml_summary_view selected
- In the field list, select line_item_usage_start_date, reservation id and ri utilization (%)
- Aggregate “line_item_usage_start_date”, by Week and aggregate “ri utilization (%)” to average by using field well
3. Continuing on your Analysis page, we’ll add a “MediaLive Reservation Inventory” visual
-
- Add another visual by clicking Add in the “Visuals” section
- Select Table as the visual type
- In the “Data” column make sure you have eml_summary_view selected
- 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 (%)
- Aggregate “line_item_usage_end_date” by Max, “count of reservation purchased” by Min and aggregate “ri utilization (%)” to average by using field well
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.
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.
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.