edgeone-s3-proxy

S3 reverse proxy for EdgeOne Pages Edge Functions.

This endpoint serves objects from an S3-compatible store that rejects anonymous access and gates requests by User-Agent. The edge function rewrites the User-Agent and attaches an AWS SigV4 signature before proxying upstream.

Health check

GET /health
-> edgeone-s3-proxy OK

Usage

GET /<object-key>

# example
GET /2026/10/abcd1234ef56.png

Requirements

All credentials are read from environment variables. Configure them in the EdgeOne Pages console under Project → Settings → Environment Variables:

AWS_ACCESS_KEY_ID      (type: Secret)
AWS_SECRET_ACCESS_KEY  (type: Secret)
S3_BUCKET
S3_ENDPOINT            hostname only, no https://
S3_REGION              optional, default cn-north-1
UA_PREFIX              optional, default S3Drive

Source

github.com/SilenceAdele/edgeone-s3-proxy