#amazon-s3 #aws #s3 #amazon #minio #r2

aws-region

Tiny Rust library for working with Amazon AWS regions, supports s3 crate

19 releases

0.27.0 Sep 6, 2024
0.25.5 Aug 30, 2024
0.25.4 Oct 15, 2023
0.25.3 Apr 10, 2023
0.20.0 Mar 28, 2020

#1424 in Network programming

Download history 22181/week @ 2024-07-29 23379/week @ 2024-08-05 19264/week @ 2024-08-12 17741/week @ 2024-08-19 18507/week @ 2024-08-26 21327/week @ 2024-09-02 20141/week @ 2024-09-09 19279/week @ 2024-09-16 20676/week @ 2024-09-23 19431/week @ 2024-09-30 22126/week @ 2024-10-07 25642/week @ 2024-10-14 26572/week @ 2024-10-21 28081/week @ 2024-10-28 25267/week @ 2024-11-04 21621/week @ 2024-11-11

102,566 downloads per month
Used in 48 crates (5 directly)

MIT license

17KB
314 lines

AWS S3 region identifier, passing in custom values is also possible, in that case it is up to you to pass a valid endpoint, otherwise boom will happen :)

Example

use std::str::FromStr;
use awsregion::Region;

// Parse from a string
let region: Region = "us-east-1".parse().unwrap();
// Choose region directly
let region = Region::EuWest2;

// Custom region requires valid region name and endpoint
let region_name = "nl-ams".to_string();
let endpoint = "https://s3.nl-ams.scw.cloud".to_string();
let region = Region::Custom { region: region_name, endpoint };

Dependencies

~260–780KB
~18K SLoC