This project is a practical alternative to running a public Apache/PHP directory
server. S3 stores the files, CloudFront delivers them globally, Lambda@Edge
renders the directory pages, and the optional S3 event updater keeps tiny
.directory-index.json files current.
That means you can publish downloads, documentation, beta builds, source files, images, and public archives without maintaining a traditional web server, patching a VPS, securing SSH, or worrying about sudden traffic spikes.
See Secure Static Hosting Without a VPS for the plain-English sales pitch and architecture overview.
Apache-style directory browsing for Amazon S3 folders served through CloudFront.
This project exists for people who want the beautiful old-web workflow:
Upload a file → refresh the folder URL → the file appears
No VPS. No Apache server. No cron job. No generated index.html pages. No static-site generator required.
This is especially useful for beginners, unemployed people learning AI/open-source software development, indie builders, teachers, students, and anyone who needs a simple public file drop while learning AWS fundamentals.
A public URL like this:
https://8k.art/beta/
can automatically display files from:
s3://www.8k.art/beta/
The generated page includes:
https://8k.art/beta/
https://8k.art/_docs/
https://8k.press/images/
8k-art-directory-browser.txt Public copy / readable source
lambda-edge-directory-browser/index.mjs Lambda@Edge directory browser
cloudfront-function-headers/allow-all-cors-and-inline-text.js
Optional CloudFront Function for UTF-8/CORS/source display
policies/lambda-edge-trust-policy.json Trust policy example
policies/s3-list-prefix-policy-example.json S3 ListBucket policy example
QUICKSTART-FOR-BEGINNERS.html Step-by-step beginner setup
DEPLOYMENT-CHECKLIST.html Deployment checklist
TROUBLESHOOTING.html Common fixes
LICENSE.txt MIT license
This runs on the CloudFront Origin Request event.
It detects approved folder URLs such as /beta/, calls Amazon S3 ListObjectsV2, and returns an HTML directory listing.
This runs on the CloudFront Viewer Response event.
It helps browsers display source files inline, for example:
.php -> text/plain; charset=utf-8
.md -> text/markdown; charset=utf-8
It also adds CORS and UTF-8 headers.
Think of Amazon S3 as a giant folder full of files.
Think of CloudFront as the fast public front door.
Think of Lambda@Edge as a tiny helper that says:
> “If someone asks for a folder, I will ask Amazon S3 what is inside and draw a nice directory page.”
Open lambda-edge-directory-browser/index.mjs and edit this block:
const BROWSABLE_PREFIX_CONFIGS = [
{
prefix: "beta/",
bucket: "www.8k.art"
},
{
prefix: "_docs/",
bucket: "www.8k.art"
},
{
prefix: "images/",
bucket: "www.8k.press"
}
];
Each entry means:
Public URL folder prefix → Amazon S3 bucket
Example:
{
prefix: "downloads/",
bucket: "my-public-bucket"
}
means:
https://your-site.example/downloads/
lists:
s3://my-public-bucket/downloads/
Open source projects often need a place for:
A traditional Apache VPS can browse folders automatically. Amazon S3 cannot do that by itself through CloudFront. This project gives you the missing piece.
Only add prefixes you want the public to browse.
This project intentionally uses an allow-list. It will not browse your entire bucket unless you explicitly configure it that way.
MIT. Use it. Adapt it. Teach with it. Improve it.
The current standard browse roots include 8k.art/beta/, 8k.press/beta/, and define.com/beta/. Each should map to its own matching S3 bucket prefix and, when enabled, its own .directory-index.json.