A static web page for browsing public (anonymous-read) Amazon S3 buckets as folders. It runs entirely in the browser: no server, no build step, no credentials.
Live: https://allenneuraldynamics.github.io/s3-browser/
Warning
Use at your own risk. This code was written by an AI coding assistant and has not been reviewed by a human. It is provided as is, without warranty of any kind (see LICENSE). Check it before relying on it.
- Folder-style navigation over
/-delimited prefixes, with breadcrumbs and browser back/forward - Paging with a configurable page size (1–1000 items per page)
- Lexicographic order by default (S3's native order); size and date sorting within a page
- Prefix search within a folder: S3 matches names that start with the typed text (case-sensitive) across the whole folder, not just the current page. Kept in the URL as
q. - Previews for text files (txt, md, json, yaml, csv, tsv, xml, Zarr metadata, …), images up to 5 MiB (jpg, png, gif, webp, …), and video (mp4, m4v, webm, ogv, mov; streamed from S3, any size). JSON is pretty-printed; CSV/TSV render as a table. Larger text files are previewed from their first 5 MiB.
- "Open" on a previewable file shows it in a full-page viewer in a new tab (text up to 10 MiB), since many objects are stored as
binary/octet-streamand would otherwise download. Other files open directly from S3. - Copy-to-clipboard buttons for full
s3://bucket/keyURIs - Light, dark, or system color theme, remembered per browser
Open the page and enter a bucket in any of these forms:
aind-open-data
aind-open-data/some/prefix/
s3://aind-open-data/some/prefix/
https://aind-open-data.s3.us-west-2.amazonaws.com/some/prefix/
The location is kept in the URL, so links can be shared. path is the bucket plus prefix or key, like an S3 URI without s3://; a trailing / means a folder, otherwise the file opens in the viewer (or the folder, if no such file exists but a folder by that name does). region and n (page size) are optional:
?path=aind-open-data/some/prefix/
?path=aind-open-data/some/prefix/data_description.json
?path=openneuro.org/ds000001/®ion=us-east-1&n=50
Requirements on the bucket:
- It allows anonymous
ListBucketandGetObject. - It returns CORS headers for
GET(and allows theRangeheader for previews of large files). Without CORS the browser blocks the request. - For bucket names containing dots outside
us-east-1, fill in the region field.
Plain HTML, CSS, and ES modules. Serve the directory with any static server:
python3 -m http.server 8000
Unit tests for the helpers in js/s3.js use Node's built-in test runner (Node 22+), with no dependencies:
node --test
Pushes to main deploy to GitHub Pages via .github/workflows/pages.yml, which replaces ?v=dev in asset URLs with the commit hash so browsers never mix cached old files with new ones. Reference any new script or stylesheet with ?v=dev. See PLAN.md for direction.