Fawad Mazhar [email protected] 2024
A sample solution that implements a scalable video-on-demand workflow on AWS, utilizing AWS Lambda, AWS Elemental MediaConvert, Amazon S3, Amazon CloudFront, Amazon EventBridge, Amazon API Gateway, and Amazon DynamoDB.
This solution implements an end-to-end workflow for processing and delivering video content using AWS services. It automates the ingestion of source videos, transcodes them into multiple Adaptive Bitrate (ABR) formats, and delivers the content globally via Amazon CloudFront.
-
Source and Destination S3 Buckets: The solution provisions an Amazon S3 bucket to store your source video files and a destination S3 bucket to store the transcoded outputs generated by AWS Elemental MediaConvert.
-
Global Content Distribution: The transcoded videos are distributed worldwide using Amazon CloudFront, with the destination S3 bucket configured as the origin.
-
API Gateway Integration: An Amazon API Gateway is deployed to facilitate content lookup and retrieve CloudFront signed cookies, ensuring secure access to your video content.
A centralized AWS Lambda function is at the core of this solution, handling multiple tasks:
- Job Submission: Automatically submits encoding jobs to AWS Elemental MediaConvert.
- Job Monitoring: Tracks encoding progress via Amazon EventBridge and triggers the Lambda function when encoding status updates occur.
- API Gateway Integration: Acts as the entry point for all routes in Amazon API Gateway.
To control access to the private content in the destination S3 bucket, this solution employs signed cookies. To generate the necessary signed requests, you'll need to create an RSA key pair:
openssl genrsa -out private_key.pem 2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
This solution is designed as a foundational implementation for a Video on Demand (VoD) platform on AWS. While it's not production-ready out of the box, it's an excellent starting point for developing a robust VoD solution.
Pre-requisites
- 🔧 AWS CLI Installed & Configured 👉 Get help here
- 🔧 Node.js 18.x+
- 🔧 AWS CDK 👉 Get help here
Installation
Run command:npm install
npm run bootstrap:dev
Deploying (eu-west-1)
Run command:npm run deploy:dev
This project is licensed under the MIT License. See the LICENSE file for more details.