AWS Cloud Practitioner — Lab 01 of 08

Lab 01 — S3 Static Website Hosting

Create an S3 bucket, enable static website hosting, and publish your first live website on AWS.

Beginner~$0 Free Tier1–2 Hours

Lab Overview

Create an Amazon S3 bucket, enable static website hosting, upload your HTML files, and configure a public read bucket policy. At the end of this lab your website will be live on the internet — no servers, no monthly fees, and no web hosting account required.

This is the foundation for all other labs. Every subsequent lab builds on the S3 website you create here.

ServicePurposeFree Tier
Amazon S3Stores your website files and serves them as a static website5 GB storage + 20K GET requests/mo free
AWS IAMBucket policy granting public read access to your filesAlways free

Step-by-Step Instructions

1
Amazon S3
Create Your S3 Bucket

An S3 bucket is a container that holds your website files. The bucket name must be globally unique.

  1. In the AWS Console search bar type S3 and click it
  2. Click Create bucket
  3. Bucket name: enter a unique name e.g. my-cloudpracticelabs-site
  4. AWS Region: select US East (N. Virginia) us-east-1
  5. Uncheck Block all public access
  6. Check the acknowledgement box that appears
  7. Leave all other settings at defaults
  8. Click Create bucket
2
Amazon S3
Enable Static Website Hosting
  1. Click on your new bucket name
  2. Click the Properties tab
  3. Scroll to the bottom and find Static website hosting
  4. Click Edit
  5. Select Enable
  6. Index document: index.html
  7. Error document: error.html
  8. Click Save changes
  9. Scroll back down to Static website hosting — copy the Bucket website endpoint URL
3
Amazon S3
Add a Bucket Policy for Public Access

By default S3 buckets are private. You need a bucket policy to allow anyone to read your files.

  1. Click the Permissions tab
  2. Scroll to Bucket policy and click Edit
  3. Paste the policy below — replace YOUR-BUCKET-NAME with your actual bucket name
  4. Click Save changes
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PublicReadGetObject",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::YOUR-BUCKET-NAME/*"
    }
  ]
}
4
Amazon S3
Upload Your Website Files
  1. Click the Objects tab
  2. Click Upload
  3. Click Add files and select your index.html and error.html
  4. Click Upload
  5. Wait for the green success banner
5
Web Browser
Test Your Live Website
  1. Paste the Bucket website endpoint URL into your browser
  2. You should see your website live on the internet
  3. Try a URL that doesn't exist — you should see your error.html page
TIP: Bookmark this URL. All future labs will add features to this same website.

Verification Checklist

What You Learned

Lab Cleanup

IMPORTANT: Delete these resources when finished to avoid charges.
#ResourceHow to Delete
1S3 ObjectsS3 → your bucket → select all objects → Delete
2S3 BucketS3 → select your bucket → Delete bucket → confirm