elmehdibelgasmi opened a new issue, #9785:
URL: https://github.com/apache/iceberg/issues/9785

   ### Apache Iceberg version
   
   None
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   ## Issue Description
   
   With **S3FileIO** implementation, Cross-Region API calls to S3 buckets 
(Iceberg read/write operations) fail with the errors below. With 
**HadoopFileIO** implementation, the same Iceberg table operations are 
successful.
   
   **Error 1:**
   
   ```
   software.amazon.awssdk.services.s3.model.S3Exception: The authorization 
header is malformed; the region 'us-east-1' is wrong; expecting 'eu-west-1' 
(Service: S3, Status Code: 400, Request ID: ..., Extended Request ID: ...)
   ```
   
   **Error 2:**
   
   ```
   software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are 
attempting to access must be addressed using the specified endpoint. Please 
send all future requests to this endpoint. (Service: S3, Status Code: 301, 
Request ID: ..., Extended Request ID: ...)
   ```
   
   
   ## Observations:
   
   - From the S3FileIO [source 
code](https://github.com/apache/iceberg/blob/3058e307481f134fade38581b322b9387337ce8b/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java#L760-L769),
 it appears that the `S3ClientBuilder`'s 
[`crossRegionAccessEnabled`](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/S3ClientBuilder.html)
 property is not present. 
   - From Hadoop's S3A [source 
code](https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/DefaultS3ClientFactory.java#L313-L332),
 `crossRegionAccessEnabled` has been implemented.
   
   Note: This property has been added since AWS SDK version >= 2.20.111 
([doc](https://aws.amazon.com/blogs/developer/introducing-s3-cross-region-support-in-the-aws-sdk-for-java-2-x/)).
   
   ## Suggestion:
   
   Add cross-account bucket access support for **S3FileIO** (i.e. as a new 
Iceberg configuration property).


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

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


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

Reply via email to