Skip to content

feat: add S3-compatible storage service - #13515

Merged
TorstenDittmann merged 5 commits into
mainfrom
feat/s3-compatible-storage
Sep 7, 2026
Merged

TorstenDittmann merged 5 commits into
mainfrom
feat/s3-compatible-storage

Conversation

@TorstenDittmann

@TorstenDittmann TorstenDittmann commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • move the S3-compatible storage gateway from the latest Appwrite Cloud main into core Appwrite
  • support SigV4 header and presigned URL authentication using project API keys
  • support bucket, object, multipart upload, copy, range, ACL compatibility, and AWS chunked requests
  • preserve Fastly original Accept-Encoding when validating signed requests
  • integrate S3 writes with events, realtime, functions, webhooks, audits, cache invalidation, and usage metering
  • add focused coverage for SigV4, AWS chunk framing, and S3 XML responses

Testing

  • vendor/bin/phpunit tests/unit/Platform/Modules/S3 (30 tests, 76 assertions; passes with the existing local missing Swoole\Timer cleanup warning)
  • vendor/bin/phpstan analyse -c phpstan.neon --no-progress --memory-limit=1G src/Appwrite/Platform/Modules/S3 src/Appwrite/Platform/Appwrite.php app/init/resources/request.php tests/unit/Platform/Modules/S3
  • composer lint src/Appwrite/Platform/Modules/S3 src/Appwrite/Platform/Appwrite.php app/init/resources/request.php tests/unit/Platform/Modules/S3

@github-actions

github-actions Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → feat/s3-compatible-storage (after).

Metric Before After Change
🚀 Requests/sec 172.28 185.26 🟢 +7.5%
⏱️ Latency P50 101.67 ms 96.3 ms 🟢 -5.3%
⏱️ Latency P95 229.44 ms 210.78 ms 🟢 -8.1%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 96.3 210.78 11,514 185.26 -18.65
Account 177.84 324.34 606 10.09 -43.63
TablesDB 97.33 173.52 6,262 102.01 -12.01
Storage 80.45 170.9 3,030 51.88 -23.84
Functions 134.24 248.75 1,616 28.5 -44.37

Top API waits (after)

API request Max wait (ms)
account.name.update 652.92
account.prefs.update 475.97
functions.variables.update 461.69
functions.runtimes.list 445.74
storage.files.create 428.47

@greptile-apps

greptile-apps Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds an S3-compatible storage gateway backed by Appwrite Storage.

  • Adds SigV4 header and presigned-URL authentication.
  • Implements bucket, object, multipart, copy, range, ACL, and AWS chunked request handling.
  • Integrates S3 operations with Appwrite events, realtime, functions, webhooks, audits, cache invalidation, and usage metering.
  • Adds focused unit coverage for signatures, chunk framing, and XML responses.

Confidence Score: 5/5

No accepted new issue from the changes since the previous review currently blocks merging.

All previous findings are resolved, and the only confirmed regression in the latest changes duplicates an existing resolved thread rather than constituting a new review comment.

Important Files Changed

Filename Overview
src/Appwrite/Platform/Modules/S3/Http/S3/Base.php Implements the core S3 storage operations, validation, multipart state, persistence, and platform side effects; the latest SSE change overlaps a resolved previous finding.
src/Appwrite/Platform/Modules/S3/Auth/SignatureV4.php Implements API-key-backed SigV4 verification for header-signed and presigned requests.
src/Appwrite/Platform/Modules/S3/Http/Init.php Initializes S3 CORS, event identity, and usage context, including replacement of pre-existing CORS header values.
app/init/resources/request.php Resolves the project ID from SigV4 credentials for S3 requests.
src/Appwrite/Platform/Appwrite.php Registers the new S3 module with the platform.
src/Appwrite/Platform/Modules/S3/Requests/AwsChunked.php Decodes supported AWS chunked request framing while signed streaming modes are rejected by the request path.

Reviews (4): Last reviewed commit: "fix: preserve S3 compatibility headers" | Re-trigger Greptile

@TorstenDittmann
TorstenDittmann marked this pull request as draft September 7, 2026 19:52
@TorstenDittmann
TorstenDittmann marked this pull request as ready for review September 7, 2026 20:15
@TorstenDittmann
TorstenDittmann merged commit ce3a851 into main Sep 7, 2026
45 checks passed
@ChiragAgg5k ChiragAgg5k mentioned this pull request Sep 10, 2026
2 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants