Fix AWS default credentials (#1963)

Fix a bug where default credentials were erroneously cleared out, which broke several implementations.
This commit is contained in:
Yong Zhang
2024-05-23 10:15:48 +08:00
committed by GitHub
parent 87ebcbeb92
commit 0e1af85c0b
-4
View File
@@ -40,10 +40,6 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co
return nil, errors.E(op, err)
}
// Remove anonymous credentials from the default config so that
// session.NewSession can auto-resolve credentials from role, profile, env etc.
awsConfig.Credentials = nil
for _, o := range options {
o(&awsConfig)
}