Repo of the Day
nexryai/google-drive-s3: Use Cloudflare Workers to turn your Google Drive into S3 object storage at no extra cost !
Published: Nov 23, 2026
Open repository ↗Use Cloudflare Workers to turn your Google Drive into S3 object storage at no extra cost ! - nexryai/google-drive-s3
Summary
nexryai/google-drive-s3 is a TypeScript Cloudflare Worker that translates the Google Drive API into an S3-compatible API, letting existing S3 clients treat a Google Drive folder as an object storage bucket. The project is called I.R.I.S. (Integrated Reliable Interop Storage) and targets the free Workers plan, using native Web Crypto for signature verification and JavaScript streams for file handling.
What it is useful for
The main use case is pointing an S3-aware tool at Google Drive instead of paying for a separate object store — for example, using an S3 client or SDK with credentials you define yourself, where a "bucket" is simply a directory under your Drive. Access control is split across two secret lists: ALLOWED_BUCKETS restricts which bucket names can be used, and PUBLIC_READ_BUCKETS optionally allows unauthenticated GET/HEAD requests for a subset of them, while write operations (PUT/POST/DELETE) always require a valid signature.
The README is explicit about limits. Hash verification is not implemented, because Workers memory constraints make it impossible to expand an entire uploaded file in memory. The authors also note the operational caution: they believe this does not violate Google Terms of Service provided no illegal content is uploaded, and they strongly recommend using it in an environment where only you can upload, to protect your Google account.
How engineers can use it
Deployment is a documented, four-step path:
-
Get Google credentials. Use rclone to create your own Google API client ID and obtain a Drive refresh token, following the linked rclone documentation. Then run
rclone config fileand read the valuesclient_id,client_secret, andrefresh_tokenfrom the config. The README warns that while your Google API client is in "Testing" mode the refresh token expires after a period, so switch modes first if you need long-lived access. -
Configure Cloudflare. Create two KV databases from the Cloudflare dashboard, fork the repository, and edit
wrangler.jsonto point the binding at your KV database ID. -
Deploy and set secrets. Run
wrangler deploy, then configure secrets via the dashboard:ACCESS_KEY,SECRET_KEY,REGION,GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_REFRESH_TOKEN,ALLOWED_BUCKETS, and optionallyPUBLIC_READ_BUCKETS. -
Handle CORS. The script does not configure CORS itself; the README directs you to set up your own Workers domain and use Cloudflare's Response Header Transform Rules to add the required headers.
If you need exact S3 client settings or troubleshooting beyond this, the repository README remains the authoritative source.