Using Amazon Simple Storage Service (Amazon S3) to host your website’s large files (such as MP4 video files and MP3’s, etc) is an excellent way to provide great content to your website visitors in a fast (high bandwidth), convenient, and inexpensive way. And the fact that you’re using Amazon S3 will be completely oblivious to your website visitors.
In my article Forget downloading from YouTube, use Amazon S3 instead I covered why you should use Amazon S3 instead of trying to download MP4 files directly from YouTube, in essence, using YouTube as a host for your video files. I also mentioned in this article that Amazon didn’t market it’s S3 service directly to consumers like us, so it wasn’t obvious at all how to use it, HOWEVER, this article will explain everything you need to know to begin using Amazon S3.
Signing up for Amazon S3
- Go to “SIGNUP” and either create a new Amazon account, or use your existing Amazon account that you use for shopping on Amazon.com.
- Follow the onscreen prompts, such as entering your website name, url, and your payment information. I personally didn’t add any ASW Premium Support, you could probably add it later if you need it.
- Once you complete the signup, you’ll need to wait until you receive the confirmation email, that way you know when your account has been activated.
Creating your Access Identifiers (Keys)
Before you can use Amazon S3, you must first create an Access Identifier, or put more simply, create a pair of keys that you’ll use to upload files, change file permissions, etc.
- Go to the Amazon Web Services (AWS) console at https://console.aws.amazon.com/ec2/home and logon.
- You DON’T need to sign up for Amazon EC2, or anything else, so you can ignore that.
- Click Account at the top of the page. This is where you can see usage reports, billing info and security info.
- Click Security Credentials and scroll down to Access Credentials.
- You should see that an Access Key has already been created when the account was created, however if there isn’t one there, create one. What you need to do is make a note of the Access Key ID and it’s Secret Access Key.
- Once you have the Access Key ID and it’s Secret Access Key, you have everything you need to start uploading files.
Using Amazon S3
At the time of writing this article, Amazon doesn’t have a way for you to upload files, change security permissions, create directories, etc from THEIR website. However, they do have plans to add it at some point in the future. HOWEVER, there is a very easy to use add-on to Firefox that has everything you need to start using Amazon S3. There MAY be one for IE, I’m just not aware of it.
Setting up the Amazon S3 Organizer Add-on for Firefox
- Launch Firefox and go to Tools at the top of the page and then click Add-ons.
- Click Get Add-ons and then search for Amazon S3, and once you see Amazon S3 Firefox Organizer (S3Fox) click Add to Firefox and go through the onscreen instructions.
- Once the add-on is installed, go to the Tools menu at the top of the page again, and click S3 Organizer.
- Once the S3 Organizer launches, click Manage Accounts and add your account using the 2 keys you noted down from #5 above or copy and paste.
- Next you need to create what Amazon calls a Bucket and I recommend you think of a good name for it as it will be used in the URL you will be using to access your files, and also I suggest you only have one “Bucket” and put all your directories underneath this “Bucket”. To create a bucket, click the button shown below:
- I just used garethhooper as my bucket name. IF you expect that most of your website visitors are in Europe, check the Place this bucket in Europe checkbox. That way your website visitors will download your files from Amazon S3’s European Data centers instead of downloading them from the USA.
Using the Amazon S3 Organizer Add-on for Firefox
- Now that you have created a bucket, you can now proceed to create directories underneath the bucket.
- To upload a file, such as an MP4, browse to the location of that file in the left-hand pane and then right-hand click on it and select Upload. The file will then be uploaded and you’ll see its progress at the bottom of the page.
- Once the file has uploaded, you’ll see it in the right-hand pane (on Amazon S3), right-hand click on it and select Edit ACL. Give Everyone the Read permission by clicking the X to the right of Everyone and underneath Read and making it a tick/check. Click OK.
- Now, to use the uploaded file you will need to know it’s URL so you can reference it. Right-hand click on the file again and click Copy URL to Clipboard. Now you’ll be able to paste the URL wherever you need it on your code, such as specifying the a video file with your JW Player.
- Repeat #1 – #4 above for all of the files you need to upload and host on Amazon S3.