Crates.io | zitane-aws-region |
lib.rs | zitane-aws-region |
version | 0.26.0 |
source | src |
created_at | 2023-07-15 14:40:51.133687 |
updated_at | 2023-07-15 14:40:51.133687 |
description | Tiny Rust library for working with Amazon AWS regions |
homepage | |
repository | https://github.com/ZitaneLabs/rust-s3-async |
max_upload_size | |
id | 917251 |
size | 13,126 |
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 :)
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 };