S3 Website Overview
Now let’s talk about how Amazon S3 can be used to create aesthetic websites.
Hosting Static Websites on S3
- S3 can host static websites and make them accessible on the internet.
- The website URL depends on the AWS Region where the bucket is created.
-
The URL format will look like one of these:
- One format uses a dash (
-
) - The other uses a dot (
.
)
- One format uses a dash (

-
Both formats are very similar.
- You don’t need to memorize them.
- Just know that both exist.
Website Content in Buckets
- You will create an extra bucket.
-
This bucket will contain files such as:
- HTML files
- Images
- Then, you enable the bucket for static website hosting.
- Once enabled, it will have a corresponding website URL.
- The user accesses your S3 bucket content through this URL.
Access Issue: 403 Forbidden
- This setup will not work if public reads are not enabled on your S3 bucket.
- That’s why, in the previous lecture, we learned about S3 bucket policies.
❗ If you get a 403 Forbidden error after enabling static website hosting, it means:
- The bucket is not public.
-
To fix this:
- You must attach an S3 bucket policy that allows public access.