Serverless · Freelance
Serverless Video-on-Demand with MediaConvert, CloudFront and Cognito
Serverless Framework stack that transcodes uploads to HLS and MP4 with thumbnails and serves them through a Cognito-protected API and signed CloudFront URLs.
// Overview
An upload triggers a Lambda that submits a MediaConvert job from a template (MP4, HLS ladder, thumbnails). A job-state event updates the video record in DynamoDB. A REST API (list, get, upload, edit, delete) is secured by two Cognito pools, one for all users and one for admins. Playback URLs are CloudFront-signed over a private origin.
// The problem
A managed pipeline to ingest, transcode, catalogue and securely stream videos with role-based access.
// Flow
- Input bucketupload event triggers the conversion Lambda
- MediaConvert jobsettings updated per object
- OutputsMP4, adaptive HLS and thumbnails
- Status eventsjob state change invokes a status Lambda
- DynamoDBmetadata and status, Ready on completion
- REST APIAPI Gateway and Lambda per endpoint
- Auth gatetwo Cognito pools, users versus admins
- DeliveryCloudFront with origin access to a private bucket, signed URLs
// Design decisions & guardrails
- Separate admin and user pools for least privilege on write and delete.
- Private origin bucket with signed URLs.
- Per-function IAM roles and single-command deploy.
// Outcome
Upload to adaptive, access-controlled playback with no servers to run.