How to host static website on Amazon S3. How to enable static website hosting for Amazon S3 Bucket.
S3 Browser
Free Windows Client for Amazon S3 and Amazon CloudFront
Follow:
Like:

Share:

Static Website Hosting on Amazon S3

How to host static website on Amazon S3

Static Website Hosting feature allows you host your static website on Amazon S3.

When a request is made to the root of your bucket configured as a website, Amazon S3 returns a root document. You can also configure Amazon S3 Bucket to return your own error documents when a 4xx-class error occurs.

With S3 Browser Freeware you can easily enable static website hosting for your bucket.

To configure Amazon S3 Bucket as a Website

1. Select the bucket, you want to configure as a website.

2. Click Buckets->Edit Website Configuration

website features for s3 bucket

Click Buckets->Edit Website Configuration or use Ctrl+W keyboard shortcut

Website Configuration Dialog will appear:

bucket website dialog

Website Configuration Dialog allows you to configure website features for amazon s3 bucket

3. Select Enable static website hosting for [bucketname]

4. Specify Index document and optionally Error document

Index document will be returned for requests made to the root of your website or for any subdirectory.

For example, a GET request made to the following URI (either direct or via a CNAME):

mywebsitedomain.s3-website-us-east-1.amazonaws.com/images/subdirectory/
Will return the following S3 object:
mywebsitedomain.s3.amazonaws.com/images/subdirectory/index.html

Error document will be returned when a 4XX error occurs. This parameter is optional. If no Error document specified, Amazon S3 will return a new HTML error page instead of the current XML error.

5. Click OK to save changes and close the dialog

Bucket name should conform with DNS requirements:

  • Should not contain uppercase characters
  • Should not contain underscores (_)
  • Should be between 3 and 63 characters long
  • Should not end with a dash
  • Cannot contain two, adjacent periods
  • Cannot contain dashes next to periods (e.g., "my-.bucket.com" and "my.-bucket" are invalid)

Static website should be accessed via the region-specific website endpoint. The website endpoint you use must be in the same region that your bucket.

Below is the table with Amazon S3 regions and corresponding website endpoints.

US Standards3-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
Asia Pacific (Singapore)s3-website-ap-southeast-1.amazonaws.com

How to manage redirections for static website.

You can set custom redirection rules to automatically redirect web page requests for specific content.

To configure redirection rules:

1. Click the Website redirection rules link located at the bottom of the Website Configuration dialog.

Website redirection rules

Click the Website redirection rules link

Website Redirection Rules dialog will open:

Website redirection dialog

Enter redirection rules and click Save changes

2. Specify routing rules using XML and click Save changes

Redirection Rules examples:

Redirect all requests from folder docs to folder documents

<RoutingRules>
  <RoutingRule>
    <Condition>
      <KeyPrefixEquals>docs/</KeyPrefixEquals>
    </Condition>
    <Redirect>
      <ReplaceKeyPrefixWith>documents/</ReplaceKeyPrefixWith>
    </Redirect>
  </RoutingRule>
</RoutingRules>

You can find more details about syntax for specifying routing rules and additional examples in AWS Documentation.

To redirect all requests to another host

1. Select the bucket and click Buckets->Edit Website Configuration

website features for s3 bucket

Click Buckets->Edit Website Configuration or use Ctrl+W keyboard shortcut

Website Configuration Dialog will open:

redirect all requests

How to redirect all requests to another host name

2. Select Redirect all requests to another host name

3. Specify host name and click OK

S3 Browser 4.7.7 Freeware
Powered by Amazon Web Services and Rated by CNET Editors!
Social Connection
Our customers say

"S3 Browser is an invaluable tool to me as a web developer to easily manage my automated site backups" -Bob Kraft, Web Developer

"Just want to show my appreciation for a wonderful product. I use S3 Browser a lot, it is a great tool." -Gideon Kuijten, Pro User

"Thank You Thank You Thank You for this tool. A must have for anyone using S3!" -Brian Cummiskey, USA

Related Products
FastGlacier
Windows Client for Amazon Glacier - new low-cost storage for data archiving and backup.
RdpGuard
protects your Windows Server from RDP Brute-force Attacks.
"Amazon Web Services", "AWS", "Amazon S3", "Amazon Simple Storage Service", "Amazon CloudFront", "CloudFront", the "Powered by Amazon Web Services" logo are trademarks of Amazon.com, Inc. or its affiliates in the US and/or other countries.
Copyright © 2008-2014 NetSDK Software, LLC. All rights reserved.  Terms of Use.  Privacy Policy.  S3 Drive.  RDP brute-force protection.