api error NotImplemented: A header you provided implies functionality that is not implemented.
Hello,
We've been proxying through this wonderful app for a year, and we have had no issues since today.
We are currently using AWS SDK Go v2 to interact with S3Proxy, and we are on both clouds GCP and Azure.
I have manually pinned Docker version to 2.7.0, but I get the same result. With version 2.6.0 it is all good.
The error is: A header you provided implies functionality that is not implemented. for both clouds.
The code is simple:
We connect using:
// Retrieve the environment variables
accessKey := configure.Username
secretKey := configure.Password
region := "us-east-1"
endpoint := configure.Url
// Load the configuration with the environment variables
cfg, err := config.LoadDefaultConfig(context.TODO(),
config.WithRegion(region),
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(accessKey, secretKey, "")),
)
require.NoError(t, err, "failed to create s3 client")
client := s3.NewFromConfig(cfg, func(options *s3.Options) {
options.UsePathStyle = true
options.Region = region
options.BaseEndpoint = &endpoint
options.HTTPClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: configure.IgnoreTLSIssues,
},
},
}
})
We create a bucket and we upload files to the bucket:
func uploadRandomFile(ctx context.Context, client *s3.Client, bucketName string, fileName string) error {
data := []byte("this is a test")
reader := bytes.NewReader(data)
_, err := client.PutObject(ctx, &s3.PutObjectInput{
Bucket: aws.String(bucketName),
Key: aws.String(fileName),
Body: reader,
})
if err != nil {
return fmt.Errorf("failed to upload file: %v", err)
}
fmt.Printf("File %s uploaded successfully\n", fileName)
return nil
}
I must also add that bucket creation works fine.
Thanks!
I need some debug logs to better understand this. Can you launch the Docker container with LOG_LEVEL=trace? I suspect that this is related to the newer AWS checksums. If so, building with the latest master may address your symptoms.
@gaul I guess this could be something similar to this: https://github.com/boto/boto3/issues/4392?
(Found this issue because I myself am running into Unknown header x-amz-checksum-crc32 with URI /foo/bar/baz with revision f22cc31 of s3proxy. I'll try disabling this on the client side using the information given here for now: https://cloudnative-pg.io/plugin-barman-cloud/docs/object_stores/#s3-compatible-storage-providers)
I'll try disabling this on the client side using the information given here for now
For reference, setting these environment variables helped in my case. 🚀