Ravi Sir's Cyber Security Cards › Revision Cards
Hosting a Static Website on S3
Hosting a Static Website on S3 S3 can serve a simple website (HTML, CSS, images) with no server. The S3 website address is HTTP only . For HTTPS and your own domain, put CloudFront in front, with Origin Access Control, so the bucket can stay private. Syncing secret files like .env or .git into a pub

Read card text
What this card says
What it is
S3 can serve a simple website (HTML, CSS, images) with no server.
HTTPS
The S3 website address is HTTP only.
For HTTPS and your own domain, put CloudFront in front, with Origin Access Control, so the bucket can stay private.
Common mistake
Syncing secret files like .env or .git into a public bucket. Exclude them in the sync command.
| Option | HTTPS | Bucket public? |
|---|---|---|
| S3 website endpoint | No | Yes (read only) |
| CloudFront + OAC | Yes, custom domain | No – only CloudFront can read |
| Nginx on EC2 (Part 3) | Yes with Certbot | Not applicable |
Learn more in the lesson: 14.4 Hosting a Static Website on S3