19 releases (12 breaking)

new 0.13.1 Mar 14, 2025
0.12.0 Jan 20, 2025
0.11.0 Oct 17, 2024
0.9.0 Jun 26, 2024
0.0.1 Mar 14, 2023

#2341 in Network programming

Download history 384/week @ 2024-11-22 488/week @ 2024-11-29 316/week @ 2024-12-06 305/week @ 2024-12-13 63/week @ 2024-12-20 10/week @ 2024-12-27 48/week @ 2025-01-03 544/week @ 2025-01-10 497/week @ 2025-01-17 155/week @ 2025-01-24 496/week @ 2025-01-31 111/week @ 2025-02-07 177/week @ 2025-02-14 405/week @ 2025-02-21 516/week @ 2025-02-28 234/week @ 2025-03-07

1,346 downloads per month
Used in mountpoint-s3-fs

Apache-2.0

590KB
11K SLoC

mountpoint-s3-client

This crate provides a high-performance Amazon S3 client for use by Mountpoint for Amazon S3. The client binds to the AWS Common Runtime, which provides features such as AWS authentication, a HTTP client, and low-level IO primitives.

This crate is not intended for general-purpose use and we consider its interface to be unstable. Customers looking for a general-purpose Amazon S3 client in Rust should use the official AWS SDK for Rust.


lib.rs:

An Amazon S3 client built on top of the AWS Common Runtime (AWS CRT).

This crate provides a high-performance implementation of an Amazon S3 client that uses the AWS Common Runtime (CRT). The CRT is a software library for interacting with AWS services, offering components like IO, HTTP, and encryption. The CRT is purpose-built for high performance and low resource usage to make the most efficient use of your compute resources. For Amazon S3, the CRT includes a client that implements best practice performance design patterns, including timeouts, retries, and automatic request parallelization for high throughput.

This crate is not intended for general-purpose use and we consider its interface to be unstable. Customers looking for a general-purpose Amazon S3 client in Rust should use the official AWS SDK for Rust.

Example

To construct a new S3 client and download an object from a bucket in the us-east-1 region:

use futures::{TryFutureExt, TryStreamExt};
use mountpoint_s3_client::types::GetObjectParams;
use mountpoint_s3_client::{S3CrtClient, ObjectClient};

let client = S3CrtClient::new(Default::default()).expect("client construction failed");

let response = client.get_object("my-bucket", "my-key", &GetObjectParams::new()).await.expect("get_object failed");
let body = response.map_ok(|(offset, body)| body.to_vec()).try_concat().await.expect("body streaming failed");

To further configure the client, use the S3ClientConfig builder:

use mountpoint_s3_client::S3CrtClient;
use mountpoint_s3_client::config::{S3ClientAuthConfig, S3ClientConfig, EndpointConfig};

let config = S3ClientConfig::new()
                .endpoint_config(EndpointConfig::new("us-west-2"))
                .auth_config(S3ClientAuthConfig::NoSigning);
let client = S3CrtClient::new(config).expect("client construction failed");

Dependencies

~41–55MB
~1M SLoC