You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "trueleo (via GitHub)" <gi...@apache.org> on 2025/03/20 21:26:53 UTC
[I] Add Content-MD5 or checksum header for using an Object Locked S3 [arrow-rs-object-store]
trueleo opened a new issue, #190:
URL: https://github.com/apache/arrow-rs-object-store/issues/190
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
I am trying to use object-store crate with AWS S3 where Object lock is enabled with versioning and some retention period. When i am trying to put object it is failing with following error
```
... <Error><Code>InvalidRequest</Code><Message>Content-MD5 OR x-amz-checksum- HTTP header is required for Put Object requests with Object Lock parameters</Message> ...
```
**Describe the solution you'd like**
A ClientOptions method like `with_content_md5` or `with_checksum_header` that will calculate and attach appropriate checksum header ( before sending `Bytes` ) so that PUT request works.
**Describe alternatives you've considered**
None
**Additional context**
This is minimal example I used for testing this out
```rust
#[tokio::main]
async fn main() {
let client = AmazonS3Builder::new()
.with_endpoint("https://s3.us-east-1.amazonaws.com")
.with_access_key_id(".....")
.with_secret_access_key(".....")
.with_bucket_name("....")
.with_region("us-east-1")
.build()
.unwrap();
client
.put(
&Path::from("foo"),
Bytes::from_static(b"content of file"),
)
.await
.unwrap();
}
```
[second notes section in AWS docs only talks about Content-MD5](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org