AWS Fargate + Lambda + Serverless Framework = Bliss
This is a companion project for the blog post How to run long-running processes with Fargate and Lambda in a Serverless app.
This reference application shows you how to create an end-to-end serverless application that extracts thumbnails from video files. But, oh no, processing video files is a long-running process! AWS Fargate to the rescue.
Video is uploaded to a S3 bucket -> A Lambda function is triggered that runs an ECS Fargate task -> The task spins up a Docker container to process the video -> The container extracts the thumbnail and uploads the image to an S3 bucket -> The container is managed by AWS Fargate. All functionality is triggered from AWS Lambda functions and contained within a serverless application written with the Serverless Framework.
Architecture diagram for processing video to generate thumbnail in AWS ECS using Fargate