AWS for M&E Blog
Introducing the Live Event Framework: Live Streaming with Ad Insertion on AWS
Video platforms are increasingly using advertising for monetization, both in free-to-air and subscription-based services. The latter often now offer ad-supported pricing models, allowing users to access content at a discounted subscription price in exchange for viewing ads. Implementing ad insertion into a live streaming platform requires careful planning and integration with multiple systems (including video players, content delivery networks (CDNs), the content origin and the publisher’s ad decision system).
At Amazon Wes Services (AWS) we’ve worked with many customers from the early investigation stages of server-side ad insertion (SSAI) through to production. From this experience, we identified several lessons and common patterns. This presented an opportunity for automation.
We created an infrastructure as code approach using the AWS Cloud Development Kit (AWS CDK), to create a repeatable pattern for setting up customer proof of concepts (POCs) and test platforms. We are publishing the project as part of our AWS CDK MediaServices Reference Architectures on GitHub.
The Live Event Framework (LEF) simplifies the initial deployment of multiple services for live streaming events on AWS, creating a functioning end-to-end system in under 15 minutes. It comes pre-configured with AWS Elemental MediaTailor to support SSAI for large scale live streaming events. In addition, it includes sample video content containing SCTE markers and a basic ad decision server (ADS). This setup allows you to quickly test ad insertion concepts, saving valuable time and resources.
Benefits of the Live Event Framework
- Speed: Deploys a multi-service live streaming architecture including sample content within minutes
- Consistency: Ensures uniform setup across different live streaming events
- Community Collaboration: Receive questions and updates from the community
- Efficiency: Reduces deployment time and minimize configuration errors
- Flexibility: Customize channel configurations to meet specific event requirements
- Periodic Updates: Maintenance and updates as new features or updated recommendations are released
- Security: Utilizes mechanisms to limit access to intended egress points only. LEF is built to be compatible with the Secure Media Delivery at the edge on AWS solution
As your testing evolves, you can customize your setup to focus on your specific environment and integrations. Examples of these incremental changes are:
- Replace our pre-configured content with your own to validate ad signalling
- Modify adaptive bitrate streaming (ABR) and resolutions to match your platform
- Migrate from the basic ADS we’ve included to a commercial offering to test decisioning against your own campaigns
- Iterate testing to validate personalization from client devices through the use of player parameters
The framework allows you to make incremental changes to understand and evaluate parts of the complex SSAI workflow without the need to start from the beginning.
A Tiered Architecture
The live event framework groups components into three tiered stacks. The purpose and hierarchy of these stacks is summarized in the following:
- Foundation Stack
- Purpose: Deploys resources shared by all channels in a region
- Frequency: Once per region
- Key Components: AWS Identity and Access Management (IAM) roles and policies, Amazon CloudFront policies, an Amazon Simple Storage Service (Amazon S3) bucket for logging and Amazon Simple Notification Service (SNS) topic and email subscription.
- Event Group Stack
- Purpose: Deploys resources for a subset of channels
- Frequency: Typically, once per region; however, running multiple event groups is supported
- Key Components: AWS Elemental MediaPackage Channel Group, Amazon CloudFront Distribution, and an AWS Elemental MediaTailor Configuration
- Dependency: Relies on the Foundation Stack
- Event Stack
- Purpose: Deploys resources for a single channel or event
- Frequency: Once per channel or event
- Key Components: AWS Elemental MediaLive Channel and MediaPackage Channel
- Dependency: Relies on both Foundation and Event Group Stacks
Under the Hood
The LEF architecture design places a CloudFront distribution in front of the MediaTailor configuration. All player interactions, including session initialization, manifest, media segments, ad segments, and tracking requests, are made through this distribution.
LEF deploys MediaPackage V2 resource types. In V2, MediaPackage introduced the concept of channel groups. A channel group is given a unique hostname which is shared across all channels placed within the group. This design suits the infrastructure as code approach utilized in the project. However, MediaPackage Live V1 channels are not supported by LEF.
In June 2024, MediaTailor introduced Common Media Application Format (CMAF) support to its dynamic transcode process, reducing the need for custom transcode profiles and making deployment more straightforward. MediaTailor will now detect when the content source is CMAF or ISOBMFF in a MPEG DASH or Apple HLS stream and dynamically transcode the ad creatives to match the program source with no additional user configuration required.
MediaTailor provides two options for tracking and reporting ad viewership:
- Server-side ad tracking, where MediaTailor sends ad tracking reports directly to the tracking URL
- Client-side ad tracking, where the client player performs ad tracking and sends beacons to the ad server
The type of reporting used for the session depends on how the playback request is initiated by the player. LEF supports both reporting models.
Getting Started with LEF
Since the Live Event Framework deploys all of the required AWS media services for you to get started, no prior knowledge of these is necessary. Prerequisites and full deployment instructions are documented in the project readme notes.
To begin using the Live Event Framework:
- Set up your AWS environment and install the AWS CDK
- Clone the AWS CDK MediaServices Reference Architecture repository from GitHub and navigate to the LEF folder
- Optionally configure your encoding parameters or stick with the project defaults
- Deploy the stacks in order:
- Foundation
- Event Group
- Event
- Confirm the SNS Email subscription sent to the email address entered as part of the foundation stack deployment
- Start the deployed MediaLive Channel
- Use the provided test player to validate video playback and that adverts are being inserted. Refer to the testing section of the project readme notes for instructions on how to obtain the streaming URLs and player details
Conclusion
The Live Event Framework (LEF) offered by AWS provides a powerful and streamlined approach to building an environment that accelerates MediaTailor Ad Insertion testing and integration with other AWS services. By leveraging the AWS CDK and a tiered stack approach, LEF simplifies the process of setting up multiple services, along with validating consistency and efficiency across multiple live streaming channels. This allows you to focus on critical SSAI integration points, such as your Ad Decision Service, reporting, and client SDKs.
To get started, visit the LEF project in the aws-samples GitHub repository and experience faster, more efficient live streaming with ad insertion on AWS.
Contact an AWS Representative to know how we can help accelerate your business.
Further Reading
Visit the following link to learn more about monetization workflows on AWS: