Hosting website with S3

Step 1: Create an S3 Bucket

  • Go to the S3 service. S3_hosting_website1
  • Click Create bucket. S3_hosting_website2
  • Enter a unique Bucket name (for example: flyora-shop).
  • Uncheck “Block all public access” S3_hosting_website3
  • Acknowledge the warning about public access. S3_hosting_website4
  • Click Create bucket.
  • S3_hosting_website5

Step 2: Upload Website Files

  • Open your newly created bucket. S3_hosting_website5
  • Click UploadAdd files → select your website files (e.g, index.html) S3_hosting_website6
    • Click Upload. S3_hosting_website7

Step 3: Enable Static Website Hosting

  • Go to the Properties tab of your bucket. S3_hosting_website8
  • Scroll down to Static website hosting. S3_hosting_website9
  • Click Edit → Enable Static website hosting
  • Enter:
    • Index document: index.html
    • Error document: index.html (optional) S3_hosting_website11
  • Click Save changes. S3_hosting_website12 *Go to the Permission tab of your bucket. S3_hosting_website13
  • Edit Bucket Policy
  • Paste the following JSON policy (replace flyora-shop with your bucket name):
{
 "Version": "2012-10-17",
 "Statement": [
   {
     "Sid": "PublicReadGetObject",
     "Effect": "Allow",
     "Principal": "*",
     "Action": "s3:GetObject",
     "Resource": "arn:aws:s3:::your-bucket-name/*"
   }
 ]
}

Step 4: Test Your Website

Click the Bucket website endpoint URL. http://your-bucket-name.s3-website-ap-southeast-1.amazonaws.com

  • Make sure it looks like this
  • S3_hosting_website14