Web Hosting

Hosting Static Website with S3 and CloudFront via HTTPS

Posted 10 May 2023

This is a simple Webpage hosting with the use of S3 bucket. This was the original set up for this particular website.

1. Get a domain name
2. Create S3 bucket (with domain name as the name of bucket)
3. Add in all the html and css files in the S3 bucket
4. Create DNS hosted zone, add the NS record to the domain name registrar
5. Create SSL certificate (add in all the used domain name in the certificate) with AWS ACM, in N.Virginia region
6. Add the SSL CNAME record to route 53 (there's a button to add automatically when creating SSL)
7. Create Origin Access Control (CloudFront > Origin Access)
8. Create a CloudFront Distribution and make the S3 bucket as the origin and attach an SSL certificate to it, and choose use OAC
10. Add A record in route 53 for the domain name to point at the CloudFront Distribution domain name. 11. Key in the domain name in your browser, and it should work

Full picture of the design is below:
Architecture Image Here
Useful Links