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

aws-region

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

16 releases

0.25.4 Oct 15, 2023
0.25.3 Apr 10, 2023
0.25.1 Jul 22, 2022
0.23.5 Feb 12, 2022
0.20.0 Mar 28, 2020

#1423 in Network programming

Download history 23915/week @ 2024-03-14 22481/week @ 2024-03-21 18276/week @ 2024-03-28 21329/week @ 2024-04-04 20975/week @ 2024-04-11 21911/week @ 2024-04-18 21197/week @ 2024-04-25 19684/week @ 2024-05-02 21770/week @ 2024-05-09 18870/week @ 2024-05-16 18672/week @ 2024-05-23 20658/week @ 2024-05-30 19334/week @ 2024-06-06 18669/week @ 2024-06-13 15820/week @ 2024-06-20 12453/week @ 2024-06-27

70,892 downloads per month
Used in 43 crates (5 directly)

MIT license

14KB
251 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

~0.3–0.8MB
~19K SLoC