Tuesday, November 22, 2011

How To Host a Static Website on S3

This tutorial will give you a step by step instruction on how to host your static website on Amazon S3 and then map it to your existing or new domain.

Why to host website on Amazon S3.
If you already have a website, you probably deal with one of the hosting providers, which offers you a certain amount of server space with a limited bandwidth that your website can consume per month for a fixed fee. Every time your site exceeds the quota, it’s very likely you’ll be switched off and asked either to keep within the package or upgrade to more expensive one. With Amazon S3 you pay only for what you use. There is no limitations or minimal fee. You pay only for disk space and bandwidth your website consumes. You even can start using Amazon absolutely for free. You will get the first 5 GB of storage and 15GB of data transfer out each month for one year with no charge.
Learn more about this free offer and Amazon S3 pricing.


All you will need.
To host your website you will need Amazon S3 account and a freeware Amazon S3 client - Cloudberry S3 Explorer. If you don’t have your account or haven’t used any amazon s3 browser before, read our step-by-step instruction which will help you create s3 account and connect it to Cloudberry S3 Explorer.
Sign-up for Amazon S3 account
Download Free Cloudberry S3 Explorer

Get started.
After you get equipped with Amazon S3 account connected to Cloudberry S3 Explorer, you are ready to start. Just launch S3 Explorer and create a new bucket in the right hand part of the S3 file manager. Insure that the bucket you created has exactly the same name as your website. For instance, if you want to host http://www.mybrandnewsite.com, the bucket must have ‘mybrandnewsite.com’ name.

Now upload all your website pages with images, CSS and other files to the bucket, you’ve just created. You can do that by dragging & dropping files and folders from the left side pane to the right side or by selecting all files you want to copy and pressing F5.

Make S3 bucket public.
When you have all your webpages in the bucket you need to make it public. In other words, you need to allow any Internet user to access information stored in the bucket. There are two ways you can do that. The first one is ACL and the second is Bucket Policy. To open access to your bucket with ACL settings, you need to select your bucket and then click on “ACL Settings” button in the tool panel just above the list of buckets.



You will see the dialog box where you must choose “Public (everyone)” option and check the box “Apply for all subfolders and files”.

If you prefer Bucket Policy to grant read access to the bucket and all files and folders inside it, you must select the bucket and click on “Bucket Policy” button located on the toolbar. The advantage of using Bucket Policies is that it applies to all new files in the bucket automatically. It’s recommended to use only one of two options, either ACL settings or Bucket policy.


After you will click the “Bucket Policy” button you will see the dialog where you need to choose “Policy Script” folder and paste the script below:
{
"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.


Prevent hotlinking.
Using of Bucket Policy will give you one more benefit. The following clause takes care of preventing hotlinking. Just replace the URLs and IP address with the ones related to your website:
"Condition":{
  "StringLike":{
    "aws:Referer":[
      "http://www.mybrandnewsite.com/*",
      "http://mybrandnewsite.com/*",
          "http://***.***.***.***/*"


Turn your bucket into a website.
The last thing you should do is enable website function for the bucket. To do this, right click on your bucket and choose “Website”. You will see the dialog box in which you should put mark on “Turn on Website” and enter page names for index.html and error.html documents.

Now your S3 bucket can be accessed as the website by typing in web browser URL that was automatically generated. In my case it looks like http://mybrandnewsite.com.s3-website-us-west-1.amazonaws.com/. Here is how the URL is formed http://<bucketname>.s3-website-<region-endpoint>.amazonaws.com.

You need to put your bucket name instead of <backetname> and a region endpoint instead of <region-endpoint>. If you don’t know the region you can find it in the bucket properties in Cloudberry Explorer. Right click on the bucket and choose “Properties”. Region of you bucket location is the second line of the list.



Then check what address you need in the box below and you will get the generated web URL of your bucket. Don’t forget to check if the URL you’ve compiled is actually working. Just paste it in your browser and if your website appears, everything is fine, if not try to make the URL once more.
The regions and their endpoints:
US Standard : s3-website-us-east-1.amazonaws.com
US West (Northern California) : s3-website-us-west-1.amazonaws.com
EU (Ireland) : s3-website-eu-west-1.amazonaws.com
Singapore ( Asia Pacific ) : s3-website-ap-southeast-1.amazonaws.com
Tokyo ( Asia Pacific ) : s3-website-ap-northeast-1.amazonaws.com

Map S3 bucket to your domain.

The last step is to get rid of the ugly URL generated by Amazon and map your S3 bucket to the domain you want Internet users find your website at. It is also quite easy to do. All you have to do is to configure appropriate CNAME in your hosting provider control panel. All hosting provider offers a way to create CNAMEs and you will just have to find out the details. To create a CNAME record you will have to specify an alias which is URL Amazon S3 generated for your bucket.

You will probably have to wait for a while before the changes will affect.

+++
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!

Friday, November 18, 2011

Get Started with Amazon S3

Starting with Amazon S3? This guide will help you to understand how to utilize Amazon S3 and what benefits you can get when storing your files on the cloud. The main factor that drives more and more people to Amazon S3 is very attractive prices and principle ‘pay for what you use’. That means you pay only for the storage and bandwidth you or your web-site/blog consumes. The other benefit is that hosting media files on the cloud make them load much faster and the storage is designed to provide “99.99% durability and 99.99% availability of stored objects over a given year”, that means Amazon S3 almost guarantee 24/7 objects accessibility. And the last ‘killing’ argument - you can start using Amazon S3 right now and absolutely for free. Just after you sign up you will receive (1) 5 GB of storage space and (2) 15GB of data transfer out each month for one year. Isn’t that the true value you’ve been seeking for? Learn more about Amazon S3 and free offer on their official web-site.

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!

Tuesday, November 15, 2011

Using AWS GovCloud with CloudBerry Backup

CloudBerry S3 Backup is a powerful Windows program that automate backup and restore processes to Amazon S3 cloud storage.
AWS GovCloud, a new AWS Region designed to allow U.S. government agencies and contractors to move more sensitive workloads into the cloud by addressing their specific regulatory and compliance requirements. The newer version of CloudBerry S3 Backup comes with a full support for the AWS GovCloud.
If you have an access to GovCloud make sure to turn on an appropriate option on the account configuration screen in Advanced settings so that CloudBerry Backup use an appropriate endpoint to connect to the GovCloud
image001

As always we would be happy to hear your feedback and you are welcome to post a comment.
+++
Note: this post applies to CloudBerry Backup 2.5 and later.
CloudBerry Backup is a Windows program that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/backup. It comes with onetime fee of $29.99 (US) per copy.
CloudBerry Backup for WHS is a Windows Home Server add-in that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/whs. It comes with onetime fee of $29.99 (US) per copy.
CloudBerry Backup Server Edition.  is a Windows program designed to run in server environment that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/server. It comes with onetime fee of $79.99 (US) per copy.

Sunday, November 13, 2011

Configure Amazon S3 Server Side Encryption (SSE)with CloudBerry Backup

CloudBerry S3 Backup is a powerful Windows program that automate backup and restore processes to Amazon S3 cloud storage.
Amazon has recently added a feature that helps encrypt the object on the server side.  Amazon S3 Server Side Encryption (SSE) provides you the ability to encrypt data stored at rest in Amazon S3. With Amazon S3 SSE, you can encrypt data on upload simply by adding an additional request header when writing the object to Amazon S3. Decryption happens automatically when data is retrieved.
Newer version of CloudBerry S3 Backup comes with a full support for Amazon S3 Server Side Encryption.
You can configure the SSE on the Compression and Encryption step of Backup Wizard:
image001
Note: you can use SSE in addition to CloudBerry client side encryption or instead of it.  Furthermore you can use SSE in the Simple Mode.
As always we would be happy to hear your feedback and you are welcome to post a comment.
+++
Note: this post applies to CloudBerry Backup 2.5 and later.
CloudBerry Backup is a Windows program that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/backup. It comes with onetime fee of $29.99 (US) per copy.
CloudBerry Backup for WHS is a Windows Home Server add-in that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/whs. It comes with onetime fee of $29.99 (US) per copy.
CloudBerry Backup Server Edition.  is a Windows program designed to run in server environment that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/server. It comes with onetime fee of $79.99 (US) per copy.

Like our products? Please help us spread the word about them. Learn here how to do it.
Want to get CloudBerry Backup for FREE? Make a blog post about us!

Friday, November 11, 2011

Local Backup with Block Level, Encryption, Compression, Versioning

CloudBerry S3 Backup is a powerful Windows program that automate backup and restore processes to Amazon S3 cloud storage.
New version of CloudBerry Backup 2.5 comes with an ability to backup data to local storage such as local disks, network shares and NAS devices. While the previous version of CloudBerry Backup had some basic support for local backup, with the newer version the users can take advantage of all product functionality available for cloud backup including block level differential backup, data encryption, data compression and data versioning.  
CloudBerry Backup 2.5 lays the foundation for a full hybrid  cloud backup implementation. The users can decide what data to store locally for high availability and what data to store in remote locations such as Amazon S3 and Windows Azure.

Local backup

With this feature you can backup data to local disks, SAN, NAS and remote file shares. This is useful if you like to backup only subset of your data to the cloud for advanced protection but also like to keep your data locally for fast access and reduced costs.
 There is a new account type called File System Storage account and you have an option to choose it on the Backup Wizard dialog.
image001
All you have to do is to specify the path to the folder where you want the backup created.

image003

Everything else will work just like with any other storage provider.  you can choose the Advanced Mode with the Block Level Backup option
image005
you can configure Purge options and how many versions to keep
image007
you can configure Compression and Encryption
image009
As always we would be happy to hear your feedback and you are welcome to post a comment.
+++
Note: this post applies to CloudBerry Backup 2.5 and later.
CloudBerry Backup is a Windows program that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/backup. It comes with onetime fee of $29.99 (US) per copy.
CloudBerry Backup for WHS is a Windows Home Server add-in that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/whs. It comes with onetime fee of $29.99 (US) per copy.
CloudBerry Backup Server Edition.  is a Windows program designed to run in server environment that leverages Amazon S3 storage. You can download it at http://www.cloudberrylab.com/server. It comes with onetime fee of $79.99 (US) per copy.

Wednesday, November 9, 2011

Using AWS GovCloud with CloudBerry Explorer

As always we are trying to stay on top of the new functionality offered by Amazon S3  to offer the most compelling Amazon S3 and CloudFront client on Windows platform.
AWS GovCloud, a new AWS Region designed to allow U.S. government agencies and contractors to move more sensitive workloads into the cloud by addressing their specific regulatory and compliance requirements. The newer version of CloudBerry S3 Explorer comes with a full support for the AWS GovCloud.
If you have an access to GovCloud make sure to turn on an appropriate option on the account configuration screen so that CloudBerry Explorer use an appropriate endpoint to connect to the GovCloud
 explorer-govcloud
Other than that the rest of the functionality is identical to other AWS regions.
As always we would be happy to hear your feedback and you are welcome to post a comment.
+++
Note: this post applies to CloudBerry Explorer 3.1 and later.
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!

Tuesday, November 8, 2011

CloudBerry Explorer: Announcing AWS West (Oregon) region support

As always we are trying to stay on top of the new functionality offered by Amazon S3  to offer the most compelling Amazon S3 and CloudFront client on Windows platform.  Following Amazon announcement on this release we are introducing the support for the new AWS West (Oregon) region support.
Now you have an option to create buckets in the new Oregon region
 oregon-bucket

Special note for CloudBerry Backup customers:  New AWS region in Oregon support is coming later this week.
+++
Note: this post applies to CloudBerry Explorer 3.1 and later.
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!