alamb commented on code in PR #16300:
URL: https://github.com/apache/datafusion/pull/16300#discussion_r2132142977


##########
datafusion-cli/src/object_storage.rs:
##########
@@ -62,23 +65,21 @@ pub async fn get_s3_object_store_builder(
             builder = builder.with_token(session_token);
         }
     } else {
-        let config = 
aws_config::defaults(BehaviorVersion::latest()).load().await;
-        if let Some(region) = config.region() {
-            builder = builder.with_region(region.to_string());
+        debug!("Using AWS S3 SDK to determine credentials");
+        let CredentialsFromConfig {
+            region,
+            credentials,
+        } = CredentialsFromConfig::try_new().await?;
+        if let Some(region) = region {
+            builder = builder.with_region(region);
+        }
+        if let Some(credentials) = credentials {
+            let credentials = Arc::new(S3CredentialProvider { credentials });
+            builder = builder.with_credentials(credentials);
+        } else {
+            debug!("No credentials found, defaulting to skip signature ");
+            builder = builder.with_skip_signature(true);

Review Comment:
   this changes the default so we don't try and create a signature if no 
credentials can be extracted



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to