#amazon #aws #s3 #r2 #minio

aws-region

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

15 releases

0.25.3 Apr 10, 2023
0.25.1 Jul 22, 2022
0.23.5 Feb 12, 2022
0.23.3 Nov 11, 2021
0.20.0 Mar 28, 2020

#590 in Network programming

Download history 22890/week @ 2023-02-07 19809/week @ 2023-02-14 22840/week @ 2023-02-21 21333/week @ 2023-02-28 22535/week @ 2023-03-07 20822/week @ 2023-03-14 18104/week @ 2023-03-21 17599/week @ 2023-03-28 12969/week @ 2023-04-04 15568/week @ 2023-04-11 15055/week @ 2023-04-18 12806/week @ 2023-04-25 13797/week @ 2023-05-02 13991/week @ 2023-05-09 12238/week @ 2023-05-16 10128/week @ 2023-05-23

52,122 downloads per month
Used in 23 crates (2 directly)

MIT license

13KB
247 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.5–1MB
~23K SLoC