Case study / 2023

AWS VOD Platform

A video-on-demand backend on AWS: uploads in, search and playback out, with every service configured and costed before a line of code.

AWS VOD Platform
7
AWS services
3
Use case paths
$0.023
Per GB stored
1 TB
Free CDN transfer a month
Roles
  • Cloud Architect
  • Backend Engineer
  • Cost Analysis
Stack
  • Amazon S3
  • AWS Lambda
  • Amazon RDS
  • CloudFront
  • CloudWatch
  • CloudTrail
  • IAM
Platforms
  • AWS
  • Web

Overview

We designed the cloud architecture for a video-on-demand application. Uploaders push large video files straight to S3, a Lambda function records each file in a relational database, and viewers search that database and stream the matching videos through CloudFront. The deliverable was more than a diagram: each service came with a recommended configuration, its permissions, and its cost at current usage, so the business could see what launch would cost and how the bill would grow with the library.

The problem

Video is the expensive kind of data. Files are large, uploads fail halfway, and serving them straight from storage is slow for viewers and costly for the business. The platform needed a setup that keeps storage private, delivers video fast worldwide, keeps the catalogue searchable, and has a predictable monthly bill.

Approach

  1. 01

    Upload

    Customers upload to an S3 bucket with multipart upload and transfer acceleration, so large files survive slow connections. Each upload triggers a Lambda function that stores the file's details in Amazon RDS.

  2. 02

    Search and stream

    A viewer's search runs against RDS, which returns the matching files. Those are requested from CloudFront, so playback comes from the nearest edge location, not the bucket.

  3. 03

    Keep data in step

    When a record changes in RDS, for example a deleted video, a Lambda function makes the matching change in S3, so storage never holds files the catalogue no longer knows about.

  4. 04

    Watch and control

    CloudWatch tracks resource use and raises alarms. CloudTrail records who changed what in the account. Team access runs through IAM groups and roles with only the permissions each job needs.

Key features

  • 01

    Private storage

    Direct access to the bucket is switched off. Only CloudFront can read it, through Origin Access Control and the bucket policy.

  • 02

    Built for big files

    Multipart upload and transfer acceleration on the bucket, in the Frequent Access tier, at $0.023 per GB per month.

  • 03

    Resilient database

    RDS in a Multi-AZ deployment with storage autoscaling and automated backups, starting on a db.t4g.medium instance and sized up only when needed.

  • 04

    Fast delivery

    CloudFront serves video from edge locations, with 1 TB of transfer and 10 million requests a month in the always-free tier, plus free SSL certificates.

  • 05

    Automation

    Lambda functions keep S3 and RDS in sync on upload and delete, each with its own IAM role and only the access it needs.

  • 06

    Costed up front

    Every service came with its price per GB, per request or per hour, so the business could forecast the bill as the library grows.