#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

#1397 in Network programming

Download history 18821/week @ 2024-01-02 19099/week @ 2024-01-09 23964/week @ 2024-01-16 20933/week @ 2024-01-23 16478/week @ 2024-01-30 14517/week @ 2024-02-06 17654/week @ 2024-02-13 19397/week @ 2024-02-20 23858/week @ 2024-02-27 25360/week @ 2024-03-05 24392/week @ 2024-03-12 22811/week @ 2024-03-19 19284/week @ 2024-03-26 21470/week @ 2024-04-02 19798/week @ 2024-04-09 19021/week @ 2024-04-16

83,917 downloads per month
Used in 40 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