Skip to content

How to Host Your Static Website on Amazon S3: Step-by-Step Guide

1 min read
  1. Login to your Amazon AWS account
  2. Create a new hosted zone for your domain using Route 53
  3. Copy the NS records for this zone to your domain provider (e.g., GoDaddy)
  4. Edit your domain on your domain registrar (e.g., GoDaddy) by clicking Set Nameservers
  5. Create a new Amazon S3 bucket for your website
  6. Edit the bucket policy
  7. Paste in this policy, making sure to update for your domain
{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "AddPerm",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::serbinskipromise.com/*"
        }
    ]
}
  1. Enable website hosting for this S3 bucket
  2. Create a record set for this new bucket: Set type A-record, Alias true and select the bucket you created before
  3. (optionally) Setup another bucket to redirect www.* requests to a clean URL (or vice versa to maintain www.*)
  4. Redirect requests to this new bucket to your main domain
  5. Create a record set for this new bucket
  6. Upload content and 🙌🏻
code

Related Posts

Members Public

The Future of Automotive Mobility will be Powered by Open Source Software

Automotive companies are shifting from bending metal to bending bits. Soon they will be offering software and services to complement their manufactured metal. In order to win in the market, they will need to embrace open-source software to build leverage and enhance their offering.

Members Public

Book Review: Drupal 7 Module Development

Well, it’s been a while my Drupal friends, almost 18 months… dusting off this old Drupal 6 blog and time to start posting again. And what better way to get started again than by talking about Drupal 7, by far the best release of Drupal. And with almost 7

Members Public

Automatically Extracting Tags from Nodes

Automatically tagging content is becoming easier with services like OpenCalais [http://opencalais.com/] and Yahoo Terms Extractor [http://developer.yahoo.com/search/content/V1/termExtraction.html], offering their APIs for free semantic analysis of content. There’s even a great Drupal module, Auto Tagging [http://drupal.org/project/autotagging] (with