There are also a bunch of technical benefits you can get from Amazon S3. If you have your own blog or web-site you will be surprised when you discover how simple media uploading, backup and restore processes are with Amazon S3. You will also like how easily you can manage all your downloadable files and external scripts.
So lets get started. I will give you a step-by-step instruction on how to start with Amazon S3 and leverage it to host your personal and web data. You will understand how to:
- Set up an Amazon S3 Account
- Find all necessary account data
- Upload and structure data
- Setup public ‘read’ access
- Secure files from hotlinking
- Connect uploaded files with web pages
First of all go to the Amazon Services Sign In Form, fill in your email address and proceed by clicking on Sign In button.

Then you’ll be asked to fill in your credentials, contact information and credit card details. After that you’ll need to activate your account by following the link in the email send to you by Amazon. Follow the link and you will see your “Access Credentials”. The data you will need in future is:
- Access Key ID
- Secret Access Key

Now is the time to connect your account to the file manager and upload files to the cloud. To make navigation and data management process easier and more convenient I use the freeware tool developed for Windows and called CloudBerry S3 Explorer. It is designed in a side-by-side file windows style, similar to most of FTP file managers and has a user-friendly interface with a lot of additional features that is not presented in the standard web-based UI. Download the latest version of this free amazon S3 client and I will explain how to connect your account and start data upload. Don’t be confused by the differences in the interface you may see on the screenshots below, that is because I’m using Pro version which has slightly different set of tools and features. Learn more about S3 Explorer Pro edition.
To setup your account in the S3 Explorer go to the File menu, click on the very first tab – “Amazon S3 Accounts” and you will see Account Registration dialog. Choose “New Account” there or click on the “Add” button.
Enter any display name you want, but ensure you insert the correct Access key and Secret key for the account you’ve created earlier. You can test if the keys you’ve entered are correct by clicking on “Test Connection” button. If the test has been successfully passed, click “OK” button.
Voilà! Your account is now connected.
Managing files and folders in Amazon S3 is as easy as on your local hard drive, but instead of drives S3 has buckets. Therefore you need to create bucket first. In the S3 Explorer you will see window split. In the left panel (lets call it “local pane”) you can see you local hard drive(s) and the right panel (“cloud pane” is nice name for that one) is for the cloud. Just click on New Bucket button on the toolbar in the ‘cloud pane’.

Enter bucket name in the dialog that popped up. Take into account that Amazon S3 has one name-space for all bucket names, that means you need to create a unique name that no one else has took up before you. Also you can choose the region where your bucket will be stored. Learn more about Amazon regions and how to choose the right one.

After your bucket is created you can upload files there. Open the bucket in ‘cloud pane’ and choose files you want to upload in the ‘local pane’. Select those files and click either “Move” or “Copy” button on the toolbar or simply drag and drop them to the ‘cloud pane’ (F5 will also work for copy). You must see files appeared in the ‘cloud pane’. You can structure your files in Amazon S3 the same way you do on your local hard drive – create folders and sub-folders and allocate files among them. Here is the picture of couple buckets in CloudBerry S3 Explorer.
When we have files on the cloud, we can connect them to a website or a blogpost. To do that we need to set access permissions for the bucket where files for public access are stored. Always think of what files you want to grant public access to and store them in the bucket with public access, but keep your personal data that you don’t want to disclose in the bucket with private access (all new buckets have “private access” only).
Now I will explain how to grant public access to the bucket. Choose the bucket you want to open to public and click on the “bucket policy” button located at the ‘cloud side’ tool bar. The advantage of using Bucket Policies is that it applies to all new files in the bucket automatically. That means you have to set the policy only once.
You will see “Policy Script” dialog where you must paste the script below, that will grant “read” public access to your bucket and prevent hotlinking of your media assets. As I mentioned earlier, the advantage of Bucket Policies is that it applies to all new files in the bucket automatically. The script to put in “Policy Script” dialog:
{
“Version”:”2008-10-17″,
“Id”:”http referer policy example”,
“Statement”:[
{
"Sid":"Allow get requests referred by www.mybrandnewsite.com, mybrandnewsite.com and IP address",
"Effect":"Allow",
"Principal":"*",
"Action":"s3:GetObject",
"Resource":"arn:aws:s3:::mybucket/*",
"Condition":{
"StringLike":{
"aws:Referer":[
"http://www.mybrandnewsite.com/*",
"http://mybrandnewsite.com/*",
"http://***.***.***.***/*"
]
}
}
}
]
}
IMPORTANT! You need to put your bucket name as well as website address and IP address instead of lines marked with red. The most important is that you insert your site addresses in aws:Referer element and your bucket name in resource element.
Now, when you have all your assets protected from hotlinking in the bucket with public ”read” policies set, the last step is generate URL’s that you can insert in your blog post or website content. Cloudberry Explorer can do that in a blink of an eye. Select file or a bunch of files you want to generate URL’s for and click on “web URL” button on the toolbar.

The dialog with URL or a list of URLs will pop up. Just copy the URL you need and use it in your blogpost or website.
Now you can upload with CloudBerry S3 Explorer new files directly to the bucket and generate URLs. All policies and restrictions will be automatically applied for all new objects.
Conclusion
In this article I gave a detailed description on how to set Amazon S3 account, upload, structure and manage files inside S3 buckets. I also described how to use Policy Designer to set up access permissions to your files and prevent hotlinking as well as how to generate web URLs for you media files.
+++
As always we would be happy to hear your feedback and you are welcome to post a comment.
CloudBerry S3 Explorer is a Windows freeware product that helps managing Amazon S3 storage and CloudFront . You can download it at http://www.cloudberrylab.com/free
CloudBerry S3 Explorer PRO is a Windows program that helps managing Amazon S3 storage and CloudFront . You can download it at http://www.cloudberrylab.com/pro It is priced at $39.99
Like our products? Please help us spread the word about them. Learn here how to do it.
Want to get CloudBerry Explorer PRO for FREE? Make a blog post about us!