Using Amazon Web Services to Host Your Video

By Michael Rohde

In my last article, How to Embed Video Into Your Web Site, I left off with how to use Amazon Web Services as a means to host and distribute your video. The costs are minimal and the features and functionality promise to be of the highest quality.

Basically, Amazon is providing the same systems they use for Amazon.com for your site. It's hard to pass up an offer like that. Let's get started and find out just how "high quality" AWS really is.

First, visit Amazon Web Services and create an account. If you already have an account from buying items on Amazon.com, then you can use that same account. Second, you need to start signing up for the different services. There are several to choose from, but for the purpose of uploading and distributing your video, you'll need: CloudFront in conjunction with an Amazon S3 bucket. The site states that it might take a few minutes to set up the services, or it could take several hours, for me it took several hours. You'll receive an email notification when the services are ready.

Now that you're signed up with the services, you'll need to create a bucket to which you'll upload your videos. For the purpose of this article, the example will use the S3 interface, I'm assuming that your a web developer and not a computer science major. If you are a professional developer, you can use C#, Perl, PHP, Ruby, Python and HTTP. This article won't go there. I'm an amateur web developer, not a professional computer scientist, so this article will take you the easy way.

I found two different interfaces that work in conjunction with AWS. The first is Bucket Explorer. It's free for 30 days and then you have to pay $50, which I don't consider cheap. The second interface that I found is called S3 Browser, which they call a freeware client. However, the Pro version sells for $30. Fair warning, if you want S3 to generate a web URL for you, which you will need in order to embed the video into your site, you will need the pro version. This article will use S3 in the examples.

After installing S3, you'll need to have your AWS Access Key and Secret Key on hand, which can be found in your AWS account. The emails you received should have links to the information. You'll also need to fill in an Account Name and an Account Comment, which you can make whatever you want. The Account Comment field is optional.

Now you're ready to create a bucket. Within S3, simply click the New button with the big green arrow next to it. The next step is the tricky step. I made several attempts to create a new bucket and they all failed until I finally matched all of their criteria. You can't use capitals and apparently you need at least one period and one number, for example, "video.1" which finally allowed me to create a new bucket. Further testing would prove if my previous attempts simply didn't go through the system or if you really do need the period and the number to go along with the lowercase letters.

Next, I clicked the Upload button and selected the same video that I used from the previous article. I wanted to test how much better the quality and functionality of AWS was compared to my own web host, which is Blue Host. Would the AWS hosted video load faster? That was the question at hand.

The upload of this 75MB video took approximately 30 minutes. Granted, I was working in the public library and using their WiFi at speeds that ranged from 30 to 90 Kb/s. Seemed to average out around 70 Kb/s. Gave me plenty of time to catch up on my Twitter feed as it uploaded…

After the first 15 minutes, the upload appeared to be complete. But then it automatically started over… Odd…

Thirty-three minutes later and I had my first uploaded video to AWS. I am really hoping that second upload time was merely a fluke. Now to get that uploaded video onto my web site.

While still in S3, you should now see your uploaded file in the top right box. Right click on the file and select Edit ACLs. Alternatively, you could click the Sharing and Security tab from the bottom box. The Owner, which is you, should have Full Control enabled. If you're ready for the world to see your video, then in the All Users row, enable Read.

In this same box is the URL for your video with a convenient Copy button. This URL won't work unless you set the permissions correctly as stated above.

For the test, I created three identical web pages with the following exceptions:

  • This page used QuickTime and the video is hosted on Blue Host
  • This page used QuickTime and the video is hosted on AWS
  • This page used a Flash player called Flowplayer and the video is hosted on Blue Host
Fortunately, I know people spread throughout the United States who could test the load times of the video. The results were rather surprising. In many cases, Blue Host provided the faster loading times over AWS. Where AWS might win out in the long run is the ability to store unlimited files, your site won't crash if you get a large spike in visitors and you won't get unexpected charges.

In terms of cost

After one day of use, and with only one 75MB file uploaded to AWS, I've been charged 15 cents. It really doesn't look like cost will be an issue with AWS. However, I've already paid my web hosting fees to Blue Host, so right now I'm not seeing the complete advantage of using AWS in terms of increased loading times.

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
Thanks for your registration, follow us on our social networks to keep up-to-date