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
Download history 15342/week @ 2024-07-02 15125/week @ 2024-07-09 18483/week @ 2024-07-16 17909/week @ 2024-07-23 23181/week @ 2024-07-30 22105/week @ 2024-08-06 19260/week @ 2024-08-13 17321/week @ 2024-08-20 18589/week @ 2024-08-27 22252/week @ 2024-09-03 20013/week @ 2024-09-10 18889/week @ 2024-09-17 21091/week @ 2024-09-24 19341/week @ 2024-10-01 23634/week @ 2024-10-08 24374/week @ 2024-10-15

91,832 downloads per month
Used in 47 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

~0.3–0.8MB
~19K SLoC