Host a Static Website on AWS S3 with CloudFront, Certficate Manager, namecheap, and GitHub Actions
Deploying a static website can be simple and efficient. By leveraging AWS S3, CloudFront, ACM, and GitHub Actions, you can host a fast, secure, and globally accessible site, with fully automated de...

Source: DEV Community
Deploying a static website can be simple and efficient. By leveraging AWS S3, CloudFront, ACM, and GitHub Actions, you can host a fast, secure, and globally accessible site, with fully automated deployments whenever updates are made. This guide will walk you through the process step by step. Step 1: Host Your Static Website on S3 Instead of making your S3 bucket public, we’ll use CloudFront Origin Access Control (OAC) to secure your content. Only CloudFront will be able to fetch files from S3, keeping your site safe while still serving content globally. 1. Create an S3 Bucket Go to the AWS S3 console and click Create bucket. Name it after your domain (e.g., mywebsitedomain.com). 2. Keep everything private: Do not enable public access. Do not enable static website hosting - CloudFront will serve them 3. Upload your website files: Add your html, css, js, and other static assets. Step 2: Setup a CloudFront Distributions To securely deliver your website with low latency worldwide, we’ll us