diff --git a/crates/polars-io/src/cloud/options.rs b/crates/polars-io/src/cloud/options.rs index 9fb812d3bd62..739a7009916c 100644 --- a/crates/polars-io/src/cloud/options.rs +++ b/crates/polars-io/src/cloud/options.rs @@ -287,14 +287,7 @@ impl CloudOptions { pub async fn build_aws(&self, url: &str) -> PolarsResult { use super::credential_provider::IntoCredentialProvider; - let mut builder = { - if self.credential_provider.is_none() { - AmazonS3Builder::from_env() - } else { - AmazonS3Builder::new() - } - } - .with_url(url); + let mut builder = AmazonS3Builder::from_env().with_url(url); if let Some(options) = &self.config { let CloudConfig::Aws(options) = options else { panic!("impl error: cloud type mismatch")