Creating dynamic MediaPackage origin mappings using Amazon CloudFront and AWS Lambda@Edge
Blog
This article explains how to use AWS Lambda@Edge with Amazon CloudFront to dynamically route live streaming requests to AWS Elemental MediaPackage origins without static configuration.
- Lambda@Edge rewrites viewer URLs to match unpredictable MediaPackage origin domains dynamically
- Eliminates need to register/deregister origins in CloudFront for each live event
- Single CloudFront distribution handles multiple events, reducing quota usage and operational overhead
- Lambda function extracts MediaPackage prefix from URL path and reconstructs origin domain
- Origin Shield minimizes Lambda invocations by caching at edge locations
- Theoretical capacity: 500,000 requests per second with default Lambda quotas
- Cost example: $0.66 for 100 requests/second over 3-hour event
Lambda@Edge enables scalable, dynamic origin mapping for event-based media streaming without CloudFront distribution redeployment.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.