Live Event Framework
May 1, 2026 · View on GitHub
The project is for users aiming to quickly deploy an end-to-end AWS Elemental MediaLive workflow (with or without Server Side Ad Insertion) to evaluate the capabilities delivered by AWS without performing a custom integration. It is intended to enable you to deploy a complete live streaming workflow with MediaLive, MediaPackage V2, and MediaTailor in minutes.
Prerequisites
- AWS CLI v2 installed and configured
- AWS CDK v2 installed and bootstrapped
- Node.js and npm
Quick Start
You can deploy everything in a single command
-
Clone and setup:
git clone https://github.com/aws-samples/aws-cdk-mediaservices-refarch cd aws-cdk-mediaservices-refarch/LEF npm install -
Deploy all stacks:
cdk deploy --all \ --context userEmail=YOUR_EMAIL \ --outputs-file ./cdk-exports-all.json -
Important: Check your email and confirm the SNS subscription for notifications.
-
Start your channel and test:
./tools/start_channel.sh ./tools/generate_uris.sh
That's it! You now have a complete live streaming workflow ready for testing.
Need more control? See Deployment Guide for step-by-step deployment options.
What You Get
This framework deploys an end-to-end live streaming solution with:
- MediaLive Channel: Live encoding with adaptive bitrate ladder
- MediaPackage V2: Live origination with HLS/CMAF and DASH/CMAF endpoints
- MediaTailor: Server-side ad insertion capabilities
- CloudFront: Global content delivery with caching
- Monitoring: CloudWatch metrics and optional logging

Architecture Overview
The framework uses a 3-stack architecture:
- Foundation Stack: Shared resources (IAM roles, S3 buckets, policies)
- Event Group Stack: Channel group resources (MediaPackage, CloudFront, MediaTailor configs)
- Event Stack: Individual channel resources (MediaLive channel, MediaPackage channel)
This design enables:
- Scalability: Deploy multiple channels efficiently
- Cost Optimization: Share resources across channels
- Flexibility: Different configurations per event group
Learn more: Architecture Details
Deployment Options
| Option | Best For | Command |
|---|---|---|
| Option A: Deploy All | Quick evaluation, demos | cdk deploy --all |
| Option B: Step-by-Step | Production, custom configs | See Deployment Guide |
Testing Your Deployment
- Start the channel:
./tools/start_channel.sh - Get playback URLs:
./tools/generate_uris.sh - Test streaming: Use the generated URLs in video players
The generate_uris.sh script provides:
- Direct MediaPackage URLs (no ads)
- MediaTailor URLs (with ad insertion)
- Test player links for easy validation
Detailed testing: Testing Guide
Next Steps
Configuration Options
- Advanced Configuration - MediaTailor logging, MediaPackage access logs, custom profiles
- MediaTailor Guide - Session initialization, ad insertion modes
- Secure Media Delivery - Content protection setup
Scaling and Production
- Multiple Events - Deploy additional channels
- Service Limits - AWS quota considerations
- Cost Optimization - Billing tags and optimization
Tools and Utilities
- Encoding Profile Generator - Custom bitrate ladders
- MediaLive Scheduled Actions - Channel automation
- Custom Transcode Profiles - Ad transcoding optimization
Important Notes
⚠️ This project is not intended for production accounts or production workloads.
- Designed for evaluation and testing of AWS MediaServices capabilities
- Uses opinionated configurations that may not align with all architectural preferences
- Review Known Issues before deployment
Cleanup
Stop your channel and delete stacks in reverse order:
./tools/stop_channel.sh
cdk destroy LefEventStack --context eventStackName=LefGroup1Event1 --context eventGroupStackName=LefGroup1
cdk destroy LefEventGroupStack --context eventGroupStackName=LefGroup1 --context foundationStackName=LefFoundation1
cdk destroy LefFoundationStack --context foundationStackName=LefFoundation1
Detailed cleanup: Troubleshooting Guide
Support & Resources
- Issues: Known Issues & Solutions
- Configuration: Advanced Configuration Options
- Architecture: Detailed Architecture Guide
- AWS CDK: CDK Workshop
Recommendations
Before getting started:
- Verify MediaTailorLogger IAM role exists
- Consider enabling Secure Media Delivery at the Edge
- Review service limits for your use case
License
This library is licensed under the MIT-0 License. See the LICENSE file.