AWS for M&E Blog

Data-driven approach: Optimizing on-demand cost of AWS Elemental MediaLive

In the dynamic world of live video streaming, optimizing costs while maintaining high-quality service is a constant challenge for media companies. Amazon Web Services (AWS) Elemental MediaLive, a cloud-based live video processing service, offers flexible pricing options to help address this challenge. However, determining the right balance between on-demand and reserved instances requires careful analysis of usage patterns.

We’ll guide you through a data-driven approach to managing MediaLive reservations. Leveraging the power of AWS Cost and Usage Reports (AWS CUR) and Amazon QuickSight you’ll gain insights into your MediaLive usage. This will help you make informed decisions about reservations and potentially reduce costs.

Before diving into the analysis, let’s review the pricing options for AWS Elemental MediaLive:

  1. On-Demand pricing: Pay only for the resources you use, you pay an hourly rate for running inputsoutputs, and add-on features. This option provides maximum flexibility but may result in higher costs for consistent usage.
  2. Reserved pricing: Commit to using MediaLive for a 12-month term in exchange for up to a 70 percent discount compared to on-demand pricing. This option can lead to substantial savings for predictable workloads.

The key to optimizing costs is finding the right mix of on-demand and reserved instances based on your specific usage patterns.

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:

Or

  • Follow the approach of manually creating Athena Tables. You will need to repeat 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

An Athena view is a logical table, allowing users to save SQL queries as virtual tables that pull the latest data from underlying sources each time they’re queried.

  1. To create the “eml_od_usage” view, copy the SQL query from CUR Query Library (MediaLive OnDemand Usage) 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 AWS 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_od_usage" AS

Amazon Athena query editor interface showing SQL code to create a view named "eml_OD_view". The code includes a "CREATE OR REPLACE VIEW" statement at the top, followed by a complex query for analyzing AWS Elemental MediaLive 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 spend of MediaLive 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_od_usage” view from Amazon Athena views to Amazon QuickSight as the datasets.
Amazon QuickSight interface showing Catalog, Database and Table to select for your AWS CUR database Athena "Choose your table" window with the catalog, dataset and tables highlighted in red to be selected for adding the “eml_od_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 an 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 “On Demand Spend by Account IDs” visual.
    • In the left sidebar, click the Add button in the “Visuals” section.
    • Select Pie Chart as the visual type.
    • In the “Data” column make sure you have eml_od_usage selected (Figure 5).
    • In the field list, select line_item_usage_account_id and sum_line_item_unblended_cost.
    • Change “sum_line_item_unblended_cost” to Sum by using a field well.
Amazon QuickSight Analysis interface showing options highlighted in red to add “On Demand Cost by Account” visual as explained in the steps.

Figure 5: Amazon QuickSight visual for AWS Elemental MediaLive on-demand spend.

  1. Staying on the same Analysis page, we’ll add an “On Demand Cost by Account ID and Usage Type” visual.
    • In the left sidebar, click the Add button in the “Visuals” section.
    • Select Table as the visual type.
    • In the “Data” column make sure you have eml_od_usage
    • In the field list, select line_item_usage_account_id, line_item_usage_type, round_sum_line_item_usage_amount and sum_line_item_unblended_cost.
    • Change “round_sum_line_item_usage_amount” and “sum_line_item_unblended_cost” to Sum by using a field well.
Amazon QuickSight Analysis interface showing options highlighted in red to add “On Demand Cost by Account IDs and Usage Types” visual as explained in the steps.

Figure 6: Amazon QuickSight visual for AWS Elemental MediaLive on-demand spend breakdown.

  1. Continuing on your Analysis page, we’ll add a “Reservation Recommendations by Usage Type” visual.
    • In the left sidebar, click the Add button in the “Visuals” section.
    • Select Table as the visual type.
    • In the “Data” column make sure you have eml_od_usage
    • In the field list, select line_item_usage_type, round_sum_line_item_usage_amount, sum_line_item_unblended_cost and Count of recommended reservations.
    • Change “round_sum_line_item_usage_amount” and “sum_line_item_unblended_cost” to Sum by using a field well.
    • Change “count of recommended reservations” to Average by using a field well.
Amazon QuickSight Analysis interface showing options highlighted in red to add “Reservation count recommendations by usage type” visual as explained in the steps.

Figure 7: Amazon QuickSight visual for AWS Elemental MediaLive reservation recommendations.

  1. On the same Analysis page, we’ll add a “Count of recommended reservations and On Demand Spend” visual.
    • In the left sidebar, click the Add button in the “Visuals” section.
    • Select Line Chart as the visual type.
    • In the “Data” column make sure you have eml_od_usage
    • In the field list, select line_item_usage_end_date, count of recommended reservations and sum_line_item_unblended_cost.
    • Aggregate “line_item_usage_end_date” by WEEK.
    • Change “count of recommended reservations” to Average by using a field well.
    • Change “sum_line_item_unblended_cost” to Sum by using a field well.
Amazon QuickSight Analysis interface showing options highlighted in red to add "week-over-week Count of Reservation needed and On Demand Spend Usage” visual as explained in the steps.

Figure 8: Amazon QuickSight visual for AWS Elemental MediaLive reservation recommendations.

After successfully following the previous steps, you will have an analysis created as shown in Figure 9. This analysis provides a comprehensive view of your AWS Elemental MediaLive on-demand usage and reservation recommendations categorized by accounts and usage types.

You can publish as a dashboard and share with the responsible personas to analyze the spend and utilization of the MediaLive reservations.

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

Figure 9: Amazon QuickSight dashboard for AWS Elemental MediaLive on-demand usage insights.

Making data-driven reservation decisions

With these insights, you can strategically approach your MediaLive reservation decisions with confidence. Start by identifying usage types that demonstrate consistent, high usage patterns, as these make ideal candidates for reservations. Take time to carefully analyze your daily usage patterns and consider future growth to determine reservation terms.

When building your business case, leverage the clear cost comparisons between on-demand and potential reserved pricing to demonstrate tangible savings to stakeholders. However, remember that maintaining operational flexibility is crucial—aim to strike an optimal balance between reserved and on-demand instances in your portfolio. This hybrid approach validates you can efficiently handle both your predictable baseline workloads and any variable spikes in demand, maximizing both cost savings and operational agility.

Implementing and monitoring your reservation strategy

After finalizing your MediaLive reservation strategy, begin by purchasing your selected reservations through either the AWS Management Console or API. To maintain optimal efficiency, implement a robust monitoring system using AWS CUR data and QuickSight dashboards to track your reservation utilization.

Stay proactive by establishing alerts that notify you of any under-utilized reservations or unexpected surges in on-demand usage. Remember that usage patterns naturally evolve over time, so make it a priority to regularly review and adjust your reservation strategy. This ongoing assessment verifies your MediaLive infrastructure continues to deliver maximum value and cost-effectiveness for your organization.

Conclusion

By leveraging AWS Cost and Usage Reports data and Amazon QuickSight visualizations, you can optimize your AWS Elemental MediaLive costs through strategic use of reservations. This data-driven approach confirms that you’re making informed decisions that balance cost savings with the flexibility needed for your media processing workloads.

Remember, the key to successful cost optimization is ongoing analysis and adjustment. Regularly revisit your AWS CUR data, QuickSight dashboards, and reservation strategy to confirm you’re always getting the most value from your MediaLive usage.

To learn more about AWS Elemental MediaLive and its pricing options, visit the AWS Elemental MediaLive pricing page. 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.