You're reading this on the exact setup described in this article. TechySnacks is hosted on S3, served via CloudFront, and pointed by Route 53.

Prerequisites

AWS AccountFree tier is sufficient for a static site with low traffic.
Domain NameA registered domain if you want a custom URL (e.g., yourdomain.com).

Part 1 — HTTP Setup (S3 + Route 53)

This section covers the basic setup for serving your site over HTTP. For HTTPS (recommended), continue to Part 2.

1
Create an S3 Bucket
Navigate to S3 in the AWS Console and click Create bucket.
  • Name the bucket to match your domain (e.g., yourdomain.com) — this simplifies Route 53 configuration.
  • Select your preferred AWS region.
  • Under Block all public access, uncheck all boxes — required for static hosting.
  • Click Create bucket.
2
Enable Static Website Hosting
Select your bucket → Properties tab → scroll to Static website hosting → click Edit.
  • Select Enable.
  • Set the Index document to index.html.
  • Optionally set an Error document (e.g., 404.html).
  • Click Save changes.
3
Configure Bucket Policy
Go to the Permissions tab → Bucket policy → click Edit. Paste this policy, replacing BUCKET-NAME with your actual bucket name:
{ "Version": "2012-10-17", "Statement": [{ "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::BUCKET-NAME/*" }] }
4
Configure Route 53 (Custom Domain)
Navigate to Route 53 → Hosted zones → select your domain → click Create record.
  • Choose Simple routing.
  • Leave record name blank for root domain, or enter www for a subdomain.
  • Choose Alias to S3 website endpoint.
  • Select your region and bucket — the endpoint auto-populates.
  • Click Create records.
5
Upload Your Files & Test
Upload your HTML, CSS, JS, and image files to the S3 bucket. After DNS propagation (can take a few minutes), visit your domain to verify everything works.
⚠️ HTTP is not secure. The setup above serves your site over HTTP — meaning traffic is unencrypted. For a secure site (HTTPS), you must add CloudFront and AWS Certificate Manager.

Part 2 — HTTPS Setup (CloudFront + ACM)

To serve your site securely over HTTPS, you need two additional services: AWS Certificate Manager (ACM) for the SSL certificate, and CloudFront as the CDN and HTTPS endpoint.

1
Request an SSL Certificate via ACM
Go to AWS Certificate ManagerRequest a certificate → choose Public certificate.
  • Enter your domain (e.g., yourdomain.com and www.yourdomain.com).
  • Choose DNS validation — ACM will give you a CNAME record to add to Route 53.
  • Add the CNAME records in Route 53 to validate ownership.
  • Wait for the certificate status to show Issued (usually a few minutes).
2
Create a CloudFront Distribution
Go to CloudFrontCreate distribution.
  • Set Origin domain to your S3 website endpoint (not the bucket ARN).
  • Under Viewer protocol policy, choose Redirect HTTP to HTTPS.
  • Under Alternate domain names (CNAMEs), add your domain.
  • Under Custom SSL certificate, select the ACM certificate you just created.
  • Set Default root object to index.html.
  • Click Create distribution.
3
Point Route 53 to CloudFront
Go to Route 53 → your hosted zone → edit the A record you created earlier.
  • Change the alias target from S3 to CloudFront distribution.
  • Select your CloudFront distribution from the dropdown.
  • Save changes.
💡 Remember: Every time you update a file in S3, you need to create a CloudFront invalidation (/*) so the CDN clears its cache and serves the new version.
Wrapping Up

You now have a fully production-grade static website — globally distributed via CloudFront, secured with HTTPS, served from S3, and reachable on your custom domain via Route 53.

This is exactly the architecture powering TechySnacks. The monthly cost for a low-traffic site is effectively zero under AWS free tier limits. Happy Hosting!

← Machine Learning — Supervised & Unsupervised All Articles →