Streaming media from Amazon S3
September 29th, 2008Business, Political, Tech, Travel, Web 10 CommentsThanks John for the reminder to investigate S3 as a business media hosting service, it works like a charm!
Now that I have far fewer bandwidth worries (max $0.17 per GB), the Torus Knot site includes a nifty dynamic selector so you can pick low, medium or high quality - the latter is at a higher resolution too, clocking in at about 100Mb. I may well use S3 for future public commercial downloads in the future too. It’s altogether more convenient than the block bandwidth allocations you get with regular hosting packages, since it scales dynamically at a very fine level of detail depending on demand. And don’t be fooled by ‘unlimited’ bandwidth offers, all hosting companies have to pay for bandwidth and there’s no such thing as ‘unlimited’ resources; you’ll actually find your bandwidth being throttled or cut off via a ‘reasonable use’ clause in the small-print; ‘unlimited’ is simply a marketing lure. If you want truly scalable guaranteed bandwidth, you have to pay for it.
Getting S3 media hosting working wasn’t that hard, but did require a few discrete steps. Firstly, you need to create a bucket in your S3 account which is all in lower case, is globally unique and is DNS-compatible; so for example I created a bucket called ‘media.torusknot.com’.
Then to make it all look nice you need to create a DNS CNAME entry to map a sub-domain of your site to that S3 bucket; in my case I mapped ‘media.torusknot.com’ to ‘media.torusknot.com.s3.amazonaws.com’. That allows me to access any files I upload to that S3 bucket via ‘http://media.torusknot.com/somefile.jpg’. You do just need to set the ACLs on the files & the bucket to make sure public access is allowed.
Finally, if you want to stream video files via a Flash player from S3 to another domain, you also have to tell Flash that it’s ok for the content to be pulled in from a different domain. Create a file called ‘crossdomain.xml’ in the bucket, with these contents:
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
</cross>
That allows the media to be accessed from anywhere - you can be more specific if you want but this is the simplest approach.
Once again I’m using the excellent FlowPlayer; my only issue with it is that the ‘buffering’ animation seems to not work all the time (so be patient if you’re viewing the high quality version).
Gotta love this cloud computing business ![]()

One of the problems with doing most of your business internationally is that you’re at the mercy of currency exchange rates, with the ever-present possibility of losing money just because the market changed. In the last couple of years the Pound has steadily got stronger against the Dollar, meaning it’s not a case of whether I lose, but rather how much. It has also meant that for new work I either have to stick to my Pound rates and risk being less competitive, or just accept a lower & ever-depreciating Dollar rate in order to secure the work.
I’m finally back at home and beginning to return to normal, trying to iron out the wrinkles in my sleep cycles. I’ve done 12 flights in the last month (I’m trying not to think of my carbon footprint, although at least I rarely drive back home) with a time zone range of 10 hours and I’m certainly feeling it - I’ll be happy to be settled in one place again for a while!