In this screencast we look into how we can host files on Amazon S3 (Simple Storage Service) in such a way that we can link to an use those assets, but not make them entirely public. Only make them accessible for logged in, subscription having users in The Lodge.
At the time I recorded this screencast, the plan was to use HTML5
<video> and have the
<source> elements inside link to Amazon hosted (and protected) video. Since then I switched to using Vimeo to display the videos (protected only to this site via Vimeo PRO. But, the idea is still relevant, especially because we still offer the directly downloads through S3.
Why S3? Hosting the files on my own web server for download is totally impractical. Far too much bandwidth for regular hosting, and I don’t want the same server in charge of displaying my website being busy serving up enormous files with super long connections. S3 is perfect for this kind of thing.
We accomplish these “secure” links by:
- Uploading the files to S3 (via a Mac app Transmit, which has easy S3 support)
- Create a custom field on the Lodge video pages with the file name
- Generate an expiring link from the file name
- Use link where needed in the template