From fb339763bc0987a75a0bce9da28ea3ea1d26aee7 Mon Sep 17 00:00:00 2001 From: Bertrand Paquet Date: Wed, 12 Apr 2023 19:54:55 +0200 Subject: [PATCH] Revert "Problem: can't use anonymous S3 credentials" Signed-off-by: Bertrand Paquet --- cache/remotecache/s3/s3.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cache/remotecache/s3/s3.go b/cache/remotecache/s3/s3.go index 630fee398..2e900a616 100644 --- a/cache/remotecache/s3/s3.go +++ b/cache/remotecache/s3/s3.go @@ -360,10 +360,6 @@ func newS3Client(ctx context.Context, config Config) (*s3Client, error) { client := s3.NewFromConfig(cfg, func(options *s3.Options) { if config.AccessKeyID != "" && config.SecretAccessKey != "" { options.Credentials = credentials.NewStaticCredentialsProvider(config.AccessKeyID, config.SecretAccessKey, config.SessionToken) - } else { - // Setting `nil` for anonymous credentials as per - // https://pkg.go.dev/github.com/aws/aws-sdk-go-v2@v1.17.6/aws#AnonymousCredentials - options.Credentials = nil } if config.EndpointURL != "" { options.UsePathStyle = config.UsePathStyle