In essence I am developing an application where users will be able to buy videos (typically concerts and other shows, professionally edited). I need to ensure that only users that bought the video is able to watch it (but not download it*).
My setup: the website will run on AWS, EC2 instances (load balanced), video files (and other media) stored in S3 containers. Provisioning with Laravel Forge.
Typically I would approach this by having Laravel simply check with middleware and a controller that everything is fine before starting to stream the content of the file with the correct headers.
I am however worried that due to the large file sizes (possibly a few GB for a show), and the fact that a request is tied up for a long time, it may prove to be inefficient and reduce the number of people that may be able to view a video at the same time.
Obviously if I don't secure the video file's location, someone might be able to access it directly for download.
Is there a way to have the S3 container query the application to determine if the person accessing it, may receive the file?
How are similar applications built?
*As to the download restriction. In essence I want to make it hard for someone to just download the video (and possibly distribute as illegal copies). I realize the fact that someone should be able to watch it, means they will get the content and it can't be 100% secured. That said, I recently came across a website, which had videos, where I was unable to download it, even though they used the video html tag (somehow the url expired immediately, but the video was able to play) -> unfortunately I do not remember the website, and my history was lost so no way to get back to it. In essence I want something where someone with novice skills, still can't access the video directly.