Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Update weed/s3api/s3tables/handler.go

Chris Luee468749bd7a
diff --git a/weed/s3api/s3tables/handler.go b/weed/s3api/s3tables/handler.go
index 982b78b281..dbe664abfe 100644
--- a/weed/s3api/s3tables/handler.go
+++ b/weed/s3api/s3tables/handler.go
@@ -161,6 +161,9 @@ func (h *S3TablesHandler) HandleRequest(w http.ResponseWriter, r *http.Request,
// This is also used as the principal for permission checks, ensuring alignment between
// the caller identity and ownership verification when IAM is enabled.
func (h *S3TablesHandler) getAccountID(r *http.Request) string {
+ if identityName := s3_constants.GetIdentityNameFromContext(r.Context()); identityName != "" {
+ return identityName
+ }
if accountID := r.Header.Get(s3_constants.AmzAccountId); accountID != "" {
return accountID
}