pub fn region() -> Result<Option<String>, CredentialsError> {
        let location = ProfileProvider::default_config_location();
        location.map(|location| {
            parse_config_file(&location).and_then(|config| {
                config
                    .get(&ProfileProvider::default_profile_name())
                    .and_then(|props| props.get(REGION))
                    .map(std::borrow::ToOwned::to_owned)
            })
        })
    }
Attempts to resolve a region value associated with the current default profile from
`~/.aws/config` or the file associated with the `AWS_CONFIG_FILE` environment variable.
As these fields do not require a region field to be defined, an `Option` type is returned

For a the ful region resolution chain, use the `Default` impl for `rusoto_core::Region`
rusoto/credential/src/profile.rs