| Crates.io | aws-region |
| lib.rs | aws-region |
| version | 0.28.0 |
| created_at | 2020-03-28 14:30:29.690137+00 |
| updated_at | 2025-09-16 21:44:28.761014+00 |
| description | Tiny Rust library for working with Amazon AWS regions, supports `s3` crate |
| homepage | |
| repository | https://github.com/durch/rust-s3 |
| max_upload_size | |
| id | 223827 |
| size | 20,542 |
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 };