AWS for M&E Blog

Schedule AWS Elemental MediaLive channel operations with AWS EventBridge

Live streaming helps businesses engage global audiences with low latency. Cloud-based streaming costs less up front than traditional broadcasting and scales to match your needs. By using serverless Amazon Web Services (AWS) services, you can automatically scale resources to match your exact streaming needs, spinning up channels for major events and efficiently cleaning up afterwards.

AWS Elemental MediaLive is a cloud-based, broadcast-grade video processing service you can use to deploy live channels within minutes. This post shows you how to automate MediaLive channel scheduling for both planned and one-time broadcasts, reducing operational costs and overhead while enabling your live streams to start and stop exactly when needed.

This solution uses a scalable, serverless architecture that automates channel management with AWS Lambda and Amazon EventBridge. You can concentrate on creating engaging viewer experiences while the infrastructure automatically manages streaming complexities.

Solution overview

The solution uses these key AWS services:

  1. Amazon DynamoDB stores channel scheduling information, including start times, end times, and channel IDs. When users create a schedule, Amazon DynamoDB Streams triggers an AWS Lambda
  2. Lambda functions process the schedule entries and create corresponding schedulers in Amazon EventBridge.
  3. Amazon EventBridge orchestrates the channel management workflows based on the defined schedules.
  4. Amazon EventBridge Scheduler executes the scheduled tasks at specified times, triggering the start and stop workflows.
  5. AWS Step Functions coordinates the workflow that:

Figure 1 shows the architecture for this solution.

High-level architecture for the solution with serverless application.

Figure 1: High-level architecture for the solution with serverless application.

Prerequisites

Before you begin, ensure you have the following:

Walkthrough

In this section, we walk you through the steps to schedule MediaLive channel operations with AWS EventBridge. The walkthrough follows these high-level steps:

  1. Provision required AWS components
  2. Add channel schedules to DynamoDB
  3. Verify your schedule
  4. Test your schedule

Complete the steps in the following sections.

Provision required AWS components

To deploy the solution using AWS CDK, on the AWS Management Console, navigate to AWS CloudShell, as shown in the following screenshot.

Navigate to AWS CloudShell by choosing the CloudShell icon in the AWS console navigation bar.

Figure 2: AWS CloudShell icon on the console navigation bar.

Enter the following command to install the stack:

git clone https://github.com/aws-samples/cyrustc-sample.git
cd cyrustc-sample/elemental-medialive-schedule-automation
npm install && npm run deploy
Paste the command into CloudShell console to deploy the solution.


Figure 3: Paste the command into the CloudShell console.

The deployment takes approximately 5 minutes. When it’s complete, you receive a confirmation message, as shown in the following screenshot.

CDK deployment confirmation showing successful stack creation.

Figure 4: Successful deployment confirmation.

Add channel schedules to DynamoDB

In this step, you define the criteria to automatically start and stop a MediaLive channel. Each schedule entry applies to one specific MediaLive channel and includes stream health monitoring so your channel runs properly beyond basic start and stop operations.

To create a schedule entry, follow these steps:

  1. Navigate to the DynamoDB console You should find a table with name starting with media-scheduler, as shown in the following screenshot.
Navigate to DynamoDB to access the media-scheduler table.

Figure 5: DynamoDB tables list showing media-scheduler table.

  1. Choose the table and choose Explore table items, as shown in the following screenshot.
Explore the media-scheduler table.

Figure 6: Table exploration view.

  1. Scroll down and choose Create item
Create item in the table.

Figure 7: Create item in the table.

  1. Choose JSON view and enter the following configuration:
{
 "mediaChannelId": {
  "S": <Your channel ID>
 },
 "startDateTime": {
  "S": "2025-02-03T09:35:00+00:00"
 },
 "endDateTime": {
  "S": "2025-02-11T09:40:00+00:00"
 },
 "manifestUrl": {
  "S": <Your HLS or DASH manifest URL for end users>
 }
}

mediaChannelId: This is the unique MediaLive channel ID and can be obtained from the MediaLive console. Each entry schedules one specific channel. For more information, visit Viewing a channel configuration.

startDateTime and endDateTime: Input a date time in ISO8601 format. The automation will start and stop accordingly.

manifestUrl: Enter your HTTP Live Streaming (HLS) or Dynamic Adaptive Streaming over HTTP (DASH) manifest URL. The automation will verify the connectivity after the channel is started. You will be notified if the health check fails.

Choose JSON view and confirm that the input values are correct, then choose Create item, as shown in the following screenshot.

JSON configuration for schedule entry.

Figure 8: JSON configuration for schedule entry.

You have now added your schedule.

Verify your schedule

After you add your schedule entry to the table, DynamoDB triggers Step Functions through EventBridge. The system automatically creates an EventBridge schedule based on the table data.

To view these scheduled events:

  1. Navigate to the Amazon EventBridge console.
  2. In the navigation pane, choose Schedule.
  3. Locate the schedule that was created. Each automation is programmed to start 10 minutes before your specified startDateTime, providing adequate preparation time. You can identify events by their naming convention because each begins with your MediaLive channel ID.
  4. Choose an individual event to view its details.
  5. Verify detailed configuration and status information.

The following screenshot shows the Schedule tab with the configuration and status information.

Verify your schedule in EventBridge showing a scheduled event.

Figure 9: EventBridge schedule details.

Note: The Amazon EventBridge schedule is automatically removed after it starts.

Test your schedule

Ten minutes before your scheduled start time, EventBridge triggers the WorkflowStateMachine.

To monitor workflow execution:

  1. Navigate to the AWS Step Functions console.
  2. Choose State machines.
  3. Choose the state machine named WorkflowStateMachine.
  4. Choose Executions to view running workflows.
  5. Choose an execution to view its progress.
  6. Verify the workflow completes these steps:
    • Starts the AWS Elemental MediaLive channel.
    • Waits 60 seconds for the channel to initialize.
    • Checks the manifest URL for stream health.
    • Sends a notification through Amazon SNS.

If the health check fails, you receive an SNS notification with error details. The following diagram shows a complete workflow execution in Step Functions.

Step Functions state machine running the workflow from channel start to stop with health checks.

Figure 10: A complete workflow execution in Step Functions.

Clean up resources

To avoid incurring future charges, delete the CDK or CloudFormation stack named ElementalMedialiveAutomationStack, which you deployed in Provision required AWS components.

Conclusion

This serverless solution automates AWS Elemental MediaLive channel management with AWS Lambda, Amazon EventBridge, and AWS Step Functions. You control costs by only running channels when needed.

This automated approach delivers two key benefits:

  • Teams can focus on creating engaging content rather than managing infrastructure
  • Organizations gain efficient resource allocation and cost control through automated scheduling

This architecture provides a foundation for organizations to scale their streaming capabilities while minimizing operational overhead.

If you need further information, create an issue on this GitHub repository or contact your account team.

Further resources

Jacky Kwok

Jacky Kwok

Jacky Kwok is an Enterprise Solutions Architect at Amazon Web Services (AWS). He’s experienced in different technology stacks, including Java, Node.js, MySQL, and PostgreSQL with hands-on experience in application development and architecting solutions over the past 10 years.

Cyrus Wong

Cyrus Wong

Cyrus Wong is an FSI Solutions Architect at Amazon Web Services (AWS). He partners with banking and financial services customers to architect enterprise generative AI applications that transform business operations while meeting regulatory requirements.

Kerry Gao

Kerry Gao

Kerry Gao is a Senior Edge GTM Specialist at Amazon Web Services (AWS), specializing in media services with over 15 years in the broadcast and media industry.