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.

s3: use static configuration by default

Chris Lu26731694f88d
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go
index c2ffefedc8..da0a38dbfd 100644
--- a/weed/s3api/auth_credentials.go
+++ b/weed/s3api/auth_credentials.go
@@ -38,13 +38,14 @@ func NewIdentityAccessManagement(option *S3ApiServerOption) *IdentityAccessManag
iam := &IdentityAccessManagement{
domain: option.DomainName,
}
- if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil {
- glog.Warningf("fail to load config: %v", err)
- }
- if len(iam.identities) == 0 && option.Config != "" {
+ if option.Config != "" {
if err := iam.loadS3ApiConfigurationFromFile(option.Config); err != nil {
glog.Fatalf("fail to load config file %s: %v", option.Config, err)
}
+ } else {
+ if err := iam.loadS3ApiConfigurationFromFiler(option); err != nil {
+ glog.Warningf("fail to load config: %v", err)
+ }
}
return iam
}