diff --git a/ydb/core/wrappers/s3_storage.cpp b/ydb/core/wrappers/s3_storage.cpp index 111393011b6a..2928be149c9f 100644 --- a/ydb/core/wrappers/s3_storage.cpp +++ b/ydb/core/wrappers/s3_storage.cpp @@ -260,7 +260,18 @@ class TPutInputStreamContext: public TInputStreamContextGet()->MutableRequest(); - request.WithStorageClass(TBase::StorageClass); + auto storageClass = TBase::StorageClass; + + // workaround for minio. + // aws s3 treats NOT_SET as STANDARD + // but internally sdk just doesn't set corresponding header, while adds it to SignedHeaders + // and minio implementation treats it as error, returning to client error + // which literally can't be debugged e.g. "There were headers present in the request which were not signed" + if (storageClass == Aws::S3::Model::StorageClass::NOT_SET) { + storageClass = Aws::S3::Model::StorageClass::STANDARD; + } + + request.WithStorageClass(storageClass); return TBase::PrepareRequest(ev); } }; // TPutInputStreamContext