How to Host a Static Website for Free with AWS S3
Posted on September 30, 2025 • 5 min read • 956 wordsA guide to hosting a static website for free using AWS S3.

Before deploying a static site with S3, basic configuration is required. Here’s the step-by-step setup:
example.com) to use it with a custom domain.Add the following policy in Bucket Policy:
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicReadGetObject",
"Effect":"Allow",
"Principal":"*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::YOUR_BUCKET_NAME/*"]
}
]
}Replace YOUR_BUCKET_NAME with the actual name of your bucket.
Once your S3 bucket is properly configured, it’s time to upload your static website and enable the hosting feature. Here are the detailed steps to get your site online in just a few minutes.
Create a simple structure like:
my-site/
βββ index.html
βββ style.css
βββ script.js
βββ img/
βββ logo.pngThe
index.htmlfile is required.
Make sure all relative paths in your HTML are correct.
Two methods:
If AWS CLI is installed and configured:
aws s3 cp ./my-site/ s3://BUCKET_NAME/ --recursiveReplace
BUCKET_NAMEwith your actual bucket name. The –recursive option is essential to upload the entire folder.
index.html404.htmlAn endpoint URL like
http://BUCKET_NAME.s3-website-REGION.amazonaws.comwill be generated.
Open the generated URL in your browser.
You should see your index.html.
If it doesn’t work:
Create a 404.html file and place it at the root of your project.
Minimal example:
<!DOCTYPE html>
<html>
<head><title>Page Not Found</title></head>
<body>
<h1>404 β Page Not Found</h1>
</body>
</html>Specify this file in the Error document setting so S3 can display it for invalid URLs.
π Note: the generated URL uses HTTP only. To enable HTTPS, configure CloudFront with an SSL certificate.
| Feature | S3 Only | S3 + CloudFront + Route 53 |
|---|---|---|
| HTTPS | β No | β Yes |
| Custom Domain | β Limited | β Full with Route 53 |
| CDN (Caching) | β No | β Yes |
| Estimated Cost (Post-Free) | β ~$0β0.50/month | β ~$1/month |
When the 12-month AWS Free Tier period ends, the resources you use are billed at the standard service rates. This does not disable your site, but it can lead to monthly charges if you continue using Amazon S3, CloudFront, or Route 53.
| Resource | Price (us-east-1) |
|---|---|
| Standard Storage | ~$0.023 USD/GB/month |
| GET Requests | ~$0.0004 per 1,000 requests |
| PUT/COPY/POST | ~$0.005 per 1,000 requests |
| Resource | Price |
|---|---|
| Data Transfer Out | ~$0.085 USD/GB |
| HTTP/HTTPS Requests | ~$0.0075 per 10,000 reqs |
| Resource | Price |
|---|---|
| Hosted Zone DNS | ~$0.50/month |
| DNS Records | Free (up to 10,000) |
| Domain Name (optional) | ~$12/year |
Assumptions:
Estimated Monthly Cost:
| Service | Cost Estimate |
|---|---|
| S3 Storage | $0.0023 |
| S3 Requests | ~$0.002 |
| CloudFront | ~$0.10β0.20 |
| Route 53 | $0.50 (if custom DNS) |
| Total | ~$0.60 to $0.75 |
Static sites remain very inexpensive, even post-Free Tier, especially at moderate traffic levels.
Use AWS Budgets to get alerts if your usage exceeds thresholds:
π https://console.aws.amazon.com/billing/home#/budgets
This helps you keep costs under control even after the Free Tier expires.
Amazon S3 offers a reliable and low-cost solution for hosting static sites. With no server maintenance and high durability, it’s perfect for modern web projects. Paired with CloudFront and Route 53, you get global delivery, HTTPS, and custom domains at minimal cost.