andygrove opened a new issue, #2264: URL: https://github.com/apache/datafusion-comet/issues/2264
### Describe the bug We ran into the following error: ``` org.apache.comet.CometNativeException: General execution error with reason: Generic S3 error: Failed to resolve region for bucket BUCKET_NAME ``` We rely on arrow-rs `resolve_bucket_region` (https://docs.rs/object_store/latest/object_store/aws/fn.resolve_bucket_region.html) to find the region. This looks for the bucket name in a 404 response: ```rust if response.status() == StatusCode::NOT_FOUND { let bucket = bucket.into(); return Err(Error::BucketNotFound { bucket }.into()); } let region = response .headers() .get("x-amz-bucket-region") .and_then(|x| x.to_str().ok()) .ok_or_else(|| Error::RegionParse { bucket: bucket.into(), })?; ``` However, according to the AWS documentation, the HeadBucket API can return either a 301 or 404, so we probably need to handle the 301 case as well. I have not yet confirmed whether this was the actual root cause, but seems like something we should implement anyway. ### Steps to reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- 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.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