VIDEO/STREAM  ·  2-tier AWS pipeline
ON AIR

Terraform · Ansible · nginx-rtmp · Let's Encrypt

The video leaves the Video streamer server,
arrives as HLS on this Frontend Server.

One private EC2 instance loops Big Buck Bunny and pushes it over RTMP. A second, public-facing instance ingests that feed, repackages it as HLS/DASH, and serves it to you here — over HTTPS, nowhere else.

Live HLS · /hls/stream.m3u8
hls://stream.m3u8
Connecting to stream…
01 · PRIVATE SUBNET
Video Streamer
ffmpeg, loop + encode
02 · TRANSPORT
RTMP :1935
SG-restricted, one source
03 · PUBLIC SUBNET
Web Frontend
nginx-rtmp → HLS/DASH
04 · DELIVERY
HTTPS :443
Let's Encrypt, DNS-01
05 · YOU
This browser
hls.js playback

What's actually running

The whole environment is provisioned by Terraform — one VPC, a public and a private subnet, security groups scoped tight enough that the Video Streamer has no inbound access from the internet at all. Ansible then configures both machines: ffmpeg and the source video on one side, nginx with the RTMP module and a Let's Encrypt certificate on the other.

TerraformAnsibleAWS EC2 nginx-rtmpffmpegRoute 53 Let's EncryptHLSDASH

Design constraints

  • HTTPS only — end users never touch the Video Streamer, or port 80.
  • Least privilege — RTMP ingest accepted from one IP, not a subnet.
  • No static keys — DNS challenge runs off the instance's IAM role.
  • Source video — Big Buck Bunny, Blender Foundation, CC-BY 3.0.