You can configure an Amazon S3 bucket to function like a website. This example walks you through the steps of hosting a website on Amazon S3.

Step 1: Creating a Bucket and Configuring It as a Website

  1. Sign in to the AWS Management Console and open the Amazon S3 console at
  2. Create a bucket.For step-by-step instructions, see How Do I Create an S3 Bucket? in Amazon Simple Storage Service Console User Guide.For bucket naming guidelines, see Bucket Restrictions and Limitations. If you have a registered domain name, for additional information about bucket naming, see Customizing Amazon S3 URLs with CNAMEs.
  3. Open the bucket Properties pane, choose Static Website Hosting, and do the following:
    1. Choose Use this bucket to host a website.
    2. In the Index Document box, type the name of your index document. The name is typically index.html.
    3. Choose Save to save the website configuration.
    4. Write down the Endpoint.This is the Amazon S3-provided website endpoint for your bucket. You use this endpoint in the following steps to test your website.

Step 2: Adding a Bucket Policy That Makes Your Bucket Content Publicly Available

  1. In the Properties pane for the bucket, choose Permissions.
  2. Choose Add Bucket Policy.
  3. To host a website, your bucket must have public read access. It is intentional that everyone in the world will have read access to this bucket. Copy the following bucket policy, and then paste it in the Bucket Policy Editor.
  4. In the policy, replace example-bucket with the name of your bucket.
  5. Choose Save.

Step 3: Uploading an Index Document

  1. Create a document. Give it the same name that you gave the index document earlier.
  2. Using the console, upload the index document to your bucket.For instructions, see Uploading S3 Objects in the Amazon Simple Storage Service Console User Guide.

Step 4: Testing Your Website

Type the following URL in the browser, replacing example-bucket with the name of your bucket and website-region with the name of the AWS Region where you deployed your bucket. For information about AWS Region names, see Website Endpoints ).

If your browser displays your index.html page, the website was successfully deployed.


HTTPS access to the website is not supported.

You now have a website hosted on Amazon S3. This website is available at the Amazon S3 website endpoint. However, you might have a domain, such as, that you want to use to serve the content from the website you created. You might also want to use Amazon S3 root domain support to serve requests for both and This requires additional steps. For an example, see Example: Setting up a Static Website Using a Custom Domain.