Hosting Stastic Website on Amazon S3 and Amazon CloudFront

Hosting a Secure Stastic Website

Project Overview:

A personal static website hosted on Amazon S3 for storage and static site hosting. Amazon CloudFront for secure, fast content delivery via CDN

Steps taken to complets this project :

1. Create and Configure S3 bucket


Amazon S3
Amazon S3
Amazon S3

- Go to Amazon S3 → Create a bucket.
- Name it exactly as your bucket.
- Enable Block all public access.
- Upload your site files.
- Add a Bucket Policy to allow Origin Access so only Cloudfront can read from Amazon S3


2. Create a CloudFront Distribution


Amazon CloudFront
Amazon CloudFront
Amazon CloudFront
Amazon CloudFront

- Origin: S3 bucket’s website endpoint
- Viewer Protocol Policy: Redirect HTTP to HTTPS
- Default root object: index.html
- Enable compression and caching
- Use CloudFront’s default domain (e.g., d1234.cloudfront.net)


3. Test Live website


Live Website

- Visit the CloudFront domain in your browser
Confirm:
- Site loads correctly
- HTTPS is active
- Assets (CSS, images) are served properly