Video Subsampling on Serverless

Jiju Thomas Mathew

AWS Server Less
Cloud Infrastructure Architect
Cloud Security Engineer
AWS
AWS Lambda
Node.js
Shifted a video subsampling system from AWS EC2 to AWS Serverless solution using a lambda written in NodeJs and statically compiled FFmpeg. S3 file created event triggered the lambda. Once subsampled, the thumb file would be copied back to S3. This could be good in situations where video file size upto 400mb. As the AWS lambda was having only 512MB disk space the lambda code checks the video file size and if exceeds 400Mb, an EC2 spot instance is triggered with the file name into the user-data parameter. The EC2 was launched from a golden ami which had the full FFmpeg installed. On top of this integrated simple authentication through CloudFront and lambda using basic authentication. There was about 80% of cost reduction in the first phase, and 86% reduced cost after switching to S3 vpc endpoints both compared to the original large EC2 solution.
Partner With Jiju Thomas
View Services

More Projects by Jiju Thomas