Skip to main content

discover_bucket_region

Function discover_bucket_region 

Source
pub async fn discover_bucket_region(
    client: &Client,
    bucket: &str,
) -> Result<Option<String>, AppError>
Expand description

Discover the AWS region of bucket by calling GetBucketLocation.

Returns Ok(None) when the call fails with a non-fatal error so callers can fall back to a default without aborting. Permanent AccessDenied is also surfaced as Ok(None) because region discovery is best-effort.

Returns Err(AppError::Network) only for transient failures the caller should log as a background warning.