Skip to content

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.

License

Notifications You must be signed in to change notification settings

fawad-mazhar/aws-sample-video-on-demand

Repository files navigation

Sample Video On Demand


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.

Project Overview

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.

Key Features

  • 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.

Lambda-Driven Workflow

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.

Secure Access with Signed Cookies

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

Important Note

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.

Deployment

Pre-requisites
Installation Run command:
npm install
npm run bootstrap:dev
Deploying (eu-west-1) Run command:
npm run deploy:dev

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published