You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "petartushev (via GitHub)" <gi...@apache.org> on 2025/01/18 13:03:23 UTC

[I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

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

   ### Query engine
   
   I'm using spark as a processing engine.
   
   ### Question
   
   I have the following docker compose file:
   ```
   version: "3"
   
   services:
       spark-iceberg:
           image: tabulario/spark-iceberg
           container_name: spark-iceberg
           build: spark/
           networks:
               iceberg_net:
           depends_on:
               - rest
               - minio
           volumes:
               - ./warehouse:/home/iceberg/warehouse
               - ./notebooks:/home/iceberg/notebooks/notebooks
           environment:
              - AWS_ACCESS_KEY_ID=admin
              - AWS_SECRET_ACCESS_KEY=password
              - AWS_REGION=us-east-1
           ports:
              - 8888:8888
              - 8080:8080
              - 10000:10000
              - 10001:10001
           
       zookeeper:
           image: wurstmeister/zookeeper:latest
           expose:
               - "2181"
   
       kafka:
           image: wurstmeister/kafka:2.13-2.8.1
           depends_on:
               - zookeeper
           ports:
               - "9092:9092"
           expose:
               - "9093"
           environment:
               KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
               KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
               KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
               KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
               KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
   
   
       postgres:
           image: postgres:16
           container_name: pg-catalog-store-spark
           networks:
               iceberg_net:
           ports:
               - "5432:5432"
           environment:
               - POSTGRES_USER=iceberg_postgres_user
               - POSTGRES_PASSWORD=iceberg_postgres_password
               - POSTGRES_DB=iceberg
           volumes:
               - pg_catalog_volume_spark:/var/lib/postgresql/data
   
       rest:
           image: tabulario/iceberg-rest
           container_name: iceberg-rest-spark
           networks:
               iceberg_net:
           ports:
               - 8181:8181
           environment:
               - AWS_ACCESS_KEY_ID=admin
               - AWS_SECRET_ACCESS_KEY=password
               - AWS_REGION=eu-west-1
               - CATALOG_WAREHOUSE=s3://warehouse/
               - CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO
               - CATALOG_CATALOG_IMPL=org.apache.iceberg.jdbc.JdbcCatalog
               - CATALOG_URI=jdbc:postgresql://postgres:5432/iceberg
               - CATALOG_JDBC_USER=iceberg_postgres_user
               - CATALOG_JDBC_PASSWORD=iceberg_postgres_password
               - CATALOG_S3_ENDPOINT=http://minio:9000
               - CATALOG_S3_PATH__STYLE_ACCESS=true
           depends_on:
               - postgres
               - minio
       
       minio:
           image: minio/minio
           container_name: minio-store-spark
           environment:
               - MINIO_ROOT_USER=admin
               - MINIO_ROOT_PASSWORD=password
               - MINIO_DOMAIN=minio
           networks:
               iceberg_net:
                   aliases:
                       - warehouse.minio
           ports:
               - 9001:9001
               - 9000:9000
           command: ["server", "/data", "--console-address", ":9001"]
   
       mc:
           depends_on:
               - minio
           image: minio/mc
           container_name: mc-spark
           networks:
               iceberg_net:
           environment:
               - AWS_ACCESS_KEY_ID=admin
               - AWS_SECRET_ACCESS_KEY=password
               - AWS_REGION=eu-west-1
           entrypoint: >
               /bin/sh -c "
               until (/usr/bin/mc config host add minio http://minio:9000 admin password) do echo '...waiting...' && sleep 1; done;
               /usr/bin/mc mb --ignore-existing minio/warehouse;
               /usr/bin/mc mb --ignore-existing minio/metadata;
               /usr/bin/mc policy set public minio/warehouse;
               /usr/bin/mc policy set public minio/metadata;
               tail -f /dev/null
               "
   
   volumes:
       pg_catalog_volume_spark:
   
   networks:
       iceberg_net:
   ```
   What I'm trying to do is stream some data from a python file using kafka as a broker, and then use spark to do something to that data, and then write it to a iceberg table. I am however having trouble appending some data to a iceberg table. Here is my code:
   ```
   package src;
   
   import org.apache.spark.sql.SparkSession;
   import org.apache.spark.sql.Dataset;
   import org.apache.spark.sql.Row;
   import org.apache.iceberg.Schema;
   import org.apache.iceberg.types.Types;
   
   public class Sandbox {
       public static void main(String[] args) {
   
           // Initialize Spark Session with Iceberg REST catalog configuration
           SparkSession spark = SparkSession.builder()
                   .appName("IcebergCatalogExample")
                   .master("local[*]") // Use local mode for testing
                   .config("spark.sql.catalog.rest", "org.apache.iceberg.spark.SparkCatalog")
                   .config("spark.sql.catalog.rest.type", "rest")
                   .config("spark.sql.catalog.rest.uri", "http://localhost:8181") // REST catalog endpoint
                   .config("spark.sql.catalog.rest.io-impl", "org.apache.iceberg.aws.s3.S3FileIO")
                   .config("spark.sql.catalog.rest.client-type", "rest")
                   .config("spark.hadoop.fs.s3a.endpoint", "http://localhost:9000") // MinIO endpoint
                   .config("spark.hadoop.fs.s3a.access.key", "admin")
                   .config("spark.hadoop.fs.s3a.secret.key", "password")
                   .config("spark.hadoop.fs.s3a.path.style.access", "true") // Required for MinIO
                   .config("spark.hadoop.fs.s3a.endpoint.region", "eu-west-1") // Use the region of your MinIO deployment
                   .config("spark.hadoop.fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem") // S3A implementation
                   .getOrCreate();
   
           // Define the namespace and table name
           String namespace = "example_namespace";
           String tableName = "example_table";
   
           // Define the schema
           Schema schema = new Schema(
                   Types.NestedField.required(1, "id", Types.LongType.get()),
                   Types.NestedField.required(2, "name", Types.StringType.get()),
                   Types.NestedField.optional(3, "email", Types.StringType.get()),
                   Types.NestedField.optional(4, "age", Types.IntegerType.get())
           );
   
   
           // Create the table if it doesn't exist
           String fullTableName = String.format("rest.%s.%s", namespace, tableName);
           try {
               // Create the table
               spark.sql(
                       String.format(
                               "CREATE TABLE IF NOT EXISTS %s " +
                               "(id BIGINT, name STRING, email STRING, age INT) " +
                               "USING iceberg " +
                               "PARTITIONED BY (age)",
                               fullTableName
                       )
               );
               System.out.println("Table created: " + fullTableName);
   
               // Insert example data
               Dataset<Row> data = spark.sql("SELECT 1 AS id, 'John Doe' AS name, 'john.doe@example.com' AS email, 30 AS age");
               data.writeTo(fullTableName).append();
   
               // Read and display the data
               Dataset<Row> tableData = spark.read().format("iceberg").load(fullTableName);
               tableData.show();
           } catch (Exception e) {
               System.err.println("Error while creating or accessing the table: " + e.getMessage());
               e.printStackTrace();
           }
   
           // Stop the Spark session
           spark.stop();
       }
   }
   
   ```
   The endpoint `minio` is modified because this is being run as a standalone cluster, outside of the cluster that is defined in the docker compose. When I run this, I get the error:
   ```
   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: 332NMTVVN450E0A2, Extended Request ID: MvTvqnln5tD/O3N1B4iyBc+8bzR0BiNro2Frh5/NH09KiZAHUj/UbOMtYZUdBWvFjlkAX0RMSzOF+Ik/SRnltA5H5P1dciD8zzUq0O68dKU=)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:85)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:43)
   	at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler$Crc32ValidationResponseHandler.handle(AwsSyncClientHandler.java:93)
   	at software.amazon.awssdk.core.internal.handler.BaseClientHandler.lambda$successTransformationResponseHandler$7(BaseClientHandler.java:279)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:50)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:38)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:74)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:43)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:79)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:41)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:55)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:39)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage2.executeRequest(RetryableStage2.java:93)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage2.execute(RetryableStage2.java:56)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage2.execute(RetryableStage2.java:36)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:53)
   	at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:35)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:82)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:62)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:43)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:50)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:32)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26)
   	at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:210)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:103)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:173)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:80)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:182)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:74)
   	at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45)
   	at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)
   	at software.amazon.awssdk.services.s3.DefaultS3Client.putObject(DefaultS3Client.java:10628)
   	at org.apache.iceberg.aws.s3.S3OutputStream.completeUploads(S3OutputStream.java:444)
   	at org.apache.iceberg.aws.s3.S3OutputStream.close(S3OutputStream.java:270)
   	at org.apache.iceberg.aws.s3.S3OutputStream.close(S3OutputStream.java:256)
   	at org.apache.iceberg.shaded.org.apache.parquet.io.DelegatingPositionOutputStream.close(DelegatingPositionOutputStream.java:38)
   	at org.apache.iceberg.shaded.org.apache.parquet.hadoop.ParquetFileWriter.end(ParquetFileWriter.java:1204)
   	at org.apache.iceberg.parquet.ParquetWriter.close(ParquetWriter.java:257)
   	at org.apache.iceberg.io.DataWriter.close(DataWriter.java:82)
   	at org.apache.iceberg.io.RollingFileWriter.closeCurrentWriter(RollingFileWriter.java:122)
   	at org.apache.iceberg.io.RollingFileWriter.close(RollingFileWriter.java:147)
   	at org.apache.iceberg.io.RollingDataWriter.close(RollingDataWriter.java:32)
   	at org.apache.iceberg.io.FanoutWriter.closeWriters(FanoutWriter.java:81)
   	at org.apache.iceberg.io.FanoutWriter.close(FanoutWriter.java:73)
   	at org.apache.iceberg.io.FanoutDataWriter.close(FanoutDataWriter.java:31)
   	at org.apache.iceberg.spark.source.SparkWrite$PartitionedDataWriter.close(SparkWrite.java:804)
   	at org.apache.iceberg.spark.source.SparkWrite$PartitionedDataWriter.commit(SparkWrite.java:786)
   	at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.$anonfun$run$5(WriteToDataSourceV2Exec.scala:475)
   	at org.apache.spark.util.Utils$.tryWithSafeFinallyAndFailureCallbacks(Utils.scala:1397)
   	at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run(WriteToDataSourceV2Exec.scala:491)
   	at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run$(WriteToDataSourceV2Exec.scala:430)
   	at org.apache.spark.sql.execution.datasources.v2.DataWritingSparkTask$.run(WriteToDataSourceV2Exec.scala:496)
   	at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.$anonfun$writeWithV2$2(WriteToDataSourceV2Exec.scala:393)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:93)
   	at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:166)
   	at org.apache.spark.scheduler.Task.run(Task.scala:141)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$4(Executor.scala:620)
   	at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally(SparkErrorUtils.scala:64)
   	at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally$(SparkErrorUtils.scala:61)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:94)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:623)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   ```
   I've found similar/identical problems here:
   https://stackoverflow.com/questions/77099097/error-when-reading-s3-data-with-spark-using-iceberg-the-bucket-you-are-attempt
   https://stackoverflow.com/questions/78846530/error-when-append-data-to-iceberg-using-spark
   
   But I cannot figure out what I am doing wrong. Any help is appreciated.


-- 
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-unsubscribe@iceberg.apache.org.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "petartushev (via GitHub)" <gi...@apache.org>.
petartushev commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2611147731

   @punyashah yes that was an issue, but if I was submitting jobs to that spark cluster. In the above example I was running the application on it's standalone cluster. Nonetheless, I changed it to `eu-west-1`.
   
   @steveloughran I tried setting the `spark.hadoop.fs.s3a.endpoint.region` to `""`. The issue still persists. 


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "steveloughran (via GitHub)" <gi...@apache.org>.
steveloughran commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2608109652

   You are trying to use minio, but that AWS SDK really loves to use aws endpoints. For extra fun the v2 sdk picks on the endpoint.region option _in ways nobody quite understands_
   
   try setting `spark.hadoop.fs.s3a.endpoint.region`
   
   Full docs on s3a and third-party stores: https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/third_party_stores.html


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "punyashah (via GitHub)" <gi...@apache.org>.
punyashah commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2601232530

   The error occurs because the `spark-iceberg` container is configured to use `us-east-1`, while your bucket is in `eu-west-1`. AWS requires the correct region to be specified when accessing S3 buckets.
   
   You can resolve this by either:
   
   1. Changing the AWS_REGION environment variable in the spark-iceberg service to eu-west-1.
   2. Recreating your bucket in us-east-1, if moving the bucket is feasible.


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "timoha (via GitHub)" <gi...@apache.org>.
timoha commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2641847579

   Running into the same problem when trying to access an iceberg table in `us-east-1` bucket from `us-east-2` account. We are using Glue for our catalog which also lives in `us-east-2`. The same `The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.` error is thrown on `pyspark.sql.SparkSession.read.format("iceberg").load(<table name in glue>)` call.
   
   We've tried the following:
   1. Updating glue catalog table's metadata_location to https:// with region. Got `TABLE_OR_VIEW_NOT_FOUND`.
   2. Setting `"spark.hadoop.fs.s3a.endpoint.region"` and `"fs.s3a.endpoint.region"` to `"us-east-1"`. Same error, the option doesn't seem to be taken into account.
   3. Setting "spark.hadoop.fs.s3a.endpoint" to `https://` with region. Still same error.
   4. Setting AWS_REGION=us-east-1 env variable. Probably would have worked if we had our Glue catalog provisioned in us-east-1 (not ideal workaround).
   
   From other tooling that we tried:
   - clickhouse works on `https://fgrovep-snowflake-externalvol-us-east-1-prod.s3.us-east-1.amazonaws.com/`, so no problem
   - AWS Athena resolves it automatically
   - pyiceberg hits this case as well, but mitigated by setting `s3.region` and `region_name` property on `load_file_io()` call
   


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #11997: software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint.
URL: https://github.com/apache/iceberg/issues/11997


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "timoha (via GitHub)" <gi...@apache.org>.
timoha commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2643141294

   Also related issue: https://github.com/apache/iceberg/issues/9785


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-3440001913

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "steveloughran (via GitHub)" <gi...@apache.org>.
steveloughran commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2651610540

   look at the s3a troubleshooting docs. Tip: extended request IDs *always* indicate you are talking to an AWS endpoing


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "timoha (via GitHub)" <gi...@apache.org>.
timoha commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2643491543

   Per #9785, we've been able to make it work for pyspark after upgrading to `org.apache.hadoop:hadoop-aws:3.4.1`, `org.apache.hadoop:hadoop-common:3.4.1`, `org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.7.1`, and `org.apache.iceberg:iceberg-aws-bundle:1.7.1`
   and setting the following options:
   - `spark.sql.catalog.glue_catalog.s3.cross-region-access-enabled`: `true`
   - `fs.s3a.cross.region.access.enabled`: `true`


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "petartushev (via GitHub)" <gi...@apache.org>.
petartushev commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2649285762

   @timoha upgraded the hadoop dependencies and my `pom.xml` file now looks like this:
   ```
       <dependencies>
           <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core -->
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-core_2.12</artifactId>
               <version>3.5.3</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-sql -->
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-sql_2.12</artifactId>
               <version>3.5.3</version>
               <scope>provided</scope>
           </dependency>
   
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-streaming_2.12</artifactId>
               <version>3.5.3</version>
               <scope>provided</scope>
           </dependency>
   
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-streaming-kafka-0-10_2.12 </artifactId>
               <version>3.5.3</version>
               <scope>provided</scope>
           </dependency>
   
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-sql-kafka-0-10_2.12</artifactId>
               <version>3.5.3</version>
               <scope>provided</scope>
           </dependency>
   
   
           <dependency>
               <groupId>org.apache.iceberg</groupId>
               <artifactId>iceberg-spark-runtime-3.5_2.12</artifactId>
               <version>1.7.0</version>
               <scope>provided</scope>
           </dependency>
   
   
   
           <!-- https://mvnrepository.com/artifact/org.apache.iceberg/iceberg-core -->
           <dependency>
               <groupId>org.apache.iceberg</groupId>
               <artifactId>iceberg-core</artifactId>
               <version>1.7.0</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/org.apache.iceberg/iceberg-aws-bundle -->
           <dependency>
               <groupId>org.apache.iceberg</groupId>
               <artifactId>iceberg-aws-bundle</artifactId>
               <version>1.7.0</version>
           </dependency>
   
   
   
   
           <dependency>
               <groupId>org.apache.kafka</groupId>
               <artifactId>kafka-clients</artifactId>
               <version>3.5.1</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-hadoop-cloud -->
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-hadoop-cloud_2.12</artifactId>
               <version>3.5.3</version>
           </dependency>
   
   
           <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-common-utils -->
           <dependency>
               <groupId>org.apache.spark</groupId>
               <artifactId>spark-common-utils_2.12</artifactId>
               <version>3.5.3</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/org.apache.hive/hive-metastore -->
           <dependency>
               <groupId>org.apache.hive</groupId>
               <artifactId>hive-metastore</artifactId>
               <version>3.1.3</version>
               <scope>provided</scope>
               <exclusions>
                   <exclusion>
                       <groupId>org.apache.logging.log4j</groupId>
                       <artifactId>log4j-api</artifactId>
                   </exclusion>
                   <exclusion>
                       <groupId>org.apache.logging.log4j</groupId>
                       <artifactId>log4j-core</artifactId>
                   </exclusion>
                   <exclusion>
                       <groupId>org.apache.logging.log4j</groupId>
                       <artifactId>log4j-slf4j-impl</artifactId>
                   </exclusion>
               </exclusions>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
           <dependency>
               <groupId>com.fasterxml.jackson.core</groupId>
               <artifactId>jackson-core</artifactId>
               <version>2.18.2</version>
               <scope>provided</scope>
           </dependency>
   
   
           <!-- AWS SDK Core (required by the S3 SDK) -->
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/url-connection-client -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>url-connection-client</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <dependency>
               <groupId>org.apache.hadoop</groupId>
               <artifactId>hadoop-common</artifactId>
               <version>3.4.1</version> <!-- Ensure the version is compatible with your Flink version -->
               <scope>provided</scope>
           </dependency>
   
           <dependency>
               <groupId>org.apache.hadoop</groupId>
               <artifactId>hadoop-aws</artifactId>
               <version>3.4.1</version>
               <scope>provided</scope>
           </dependency>
   
           <dependency>
               <groupId>org.apache.hadoop</groupId>
               <artifactId>hadoop-client</artifactId>
               <version>3.4.1</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/s3 -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>s3</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/sts -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>sts</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/glue -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>glue</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/protocol-core -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>protocol-core</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/utils -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>utils</artifactId>
               <version>2.30.16</version>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/aws-core -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>aws-core</artifactId>
               <version>2.30.16</version>
           </dependency>
   
   
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/dynamodb -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>dynamodb</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/software.amazon.awssdk/kms -->
           <dependency>
               <groupId>software.amazon.awssdk</groupId>
               <artifactId>kms</artifactId>
               <version>2.30.16</version>
               <scope>provided</scope>
           </dependency>
   
           <!-- https://mvnrepository.com/artifact/io.github.cdimascio/dotenv-java -->
           <dependency>
               <groupId>io.github.cdimascio</groupId>
               <artifactId>dotenv-java</artifactId>
               <version>3.0.2</version>
           </dependency>
   
   
       </dependencies>
   ```
   Also I set your suggested options and my original issue is solved (I presume), but now I'm getting an error with this stacktrace:
   ```
   Caused by: software.amazon.awssdk.services.s3.model.S3Exception: The AWS Access Key Id you provided does not exist in our records. (Service: S3, Status Code: 403, Request ID: 6ZZMT4KJZXHSNQSG, Extended Request ID: 4crEDh1G8LkL0TgG3BvoUK9WOIXHSzl46Xa9iAVF8D7F78fpbm0WEJkPFufDl3yrHLuLIXFZ8hKewnjR+dby3+gUgiorE+Fr)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:85)
   	at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handle(AwsXmlPredicatedResponseHandler.java:43)
   	at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler$Crc32ValidationResponseHandler.handle(AwsSyncClientHandler.java:93)
   	at software.amazon.awssdk.core.internal.handler.BaseClientHandler.lambda$successTransformationResponseHandler$7(BaseClientHandler.java:279)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:50)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:38)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:74)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:43)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:79)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:41)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:55)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptMetricCollectionStage.execute(ApiCallAttemptMetricCollectionStage.java:39)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage2.executeRequest(RetryableStage2.java:93)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage2.execute(RetryableStage2.java:56)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage2.execute(RetryableStage2.java:36)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:53)
   	at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:35)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:82)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:62)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:43)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:50)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:32)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
   	at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26)
   	at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:210)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:103)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:173)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.lambda$execute$1(BaseSyncClientHandler.java:80)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.measureApiCallSuccess(BaseSyncClientHandler.java:182)
   	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:74)
   	at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45)
   	at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)
   	at software.amazon.awssdk.services.s3.DefaultS3Client.putObject(DefaultS3Client.java:10595)
   	at software.amazon.awssdk.services.s3.DelegatingS3Client.lambda$putObject$83(DelegatingS3Client.java:8604)
   	at software.amazon.awssdk.services.s3.internal.crossregion.S3CrossRegionSyncClient.invokeOperation(S3CrossRegionSyncClient.java:74)
   	at software.amazon.awssdk.services.s3.DelegatingS3Client.putObject(DelegatingS3Client.java:8604)
   	at org.apache.iceberg.aws.s3.S3OutputStream.completeUploads(S3OutputStream.java:444)
   	at org.apache.iceberg.aws.s3.S3OutputStream.close(S3OutputStream.java:270)
   	at org.apache.iceberg.aws.s3.S3OutputStream.close(S3OutputStream.java:256)
   	at org.apache.iceberg.shaded.org.apache.parquet.io.DelegatingPositionOutputStream.close(DelegatingPositionOutputStream.java:38)
   	at org.apache.iceberg.shaded.org.apache.parquet.hadoop.ParquetFileWriter.end(ParquetFileWriter.java:1204)
   	at org.apache.iceberg.parquet.ParquetWriter.close(ParquetWriter.java:257)
   	at org.apache.iceberg.io.DataWriter.close(DataWriter.java:82)
   	at org.apache.iceberg.io.RollingFileWriter.closeCurrentWriter(RollingFileWriter.java:122)
   	at org.apache.iceberg.io.RollingFileWriter.close(RollingFileWriter.java:147)
   	at org.apache.iceberg.io.RollingDataWriter.close(RollingDataWriter.java:32)
   	at org.apache.iceberg.spark.source.SparkWrite$UnpartitionedDataWriter.close(SparkWrite.java:747)
   	at org.apache.iceberg.spark.source.SparkWrite$UnpartitionedDataWriter.commit(SparkWrite.java:729)
   	at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.$anonfun$run$5(WriteToDataSourceV2Exec.scala:475)
   	at org.apache.spark.util.Utils$.tryWithSafeFinallyAndFailureCallbacks(Utils.scala:1397)
   	at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run(WriteToDataSourceV2Exec.scala:491)
   	at org.apache.spark.sql.execution.datasources.v2.WritingSparkTask.run$(WriteToDataSourceV2Exec.scala:430)
   	at org.apache.spark.sql.execution.datasources.v2.DataWritingSparkTask$.run(WriteToDataSourceV2Exec.scala:496)
   	at org.apache.spark.sql.execution.datasources.v2.V2TableWriteExec.$anonfun$writeWithV2$2(WriteToDataSourceV2Exec.scala:393)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:93)
   	at org.apache.spark.TaskContext.runTaskWithListeners(TaskContext.scala:166)
   	at org.apache.spark.scheduler.Task.run(Task.scala:141)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$4(Executor.scala:620)
   	at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally(SparkErrorUtils.scala:64)
   	at org.apache.spark.util.SparkErrorUtils.tryWithSafeFinally$(SparkErrorUtils.scala:61)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:94)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:623)
   ```
   I created my own keys in the minio client, and I also tried with the root keys specified in `docker-compose.yml`, but the latest issue persists. 


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-3499932628

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
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-unsubscribe@iceberg.apache.org

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


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


Re: [I] software.amazon.awssdk.services.s3.model.S3Exception: The bucket you are attempting to access must be addressed using the specified endpoint. [iceberg]

Posted by "petartushev (via GitHub)" <gi...@apache.org>.
petartushev commented on issue #11997:
URL: https://github.com/apache/iceberg/issues/11997#issuecomment-2676269191

   I resolved the issue. I cannot quite explain the first issue  `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.`.  I solved this one when I added
   ```
   .config("spark.sql.catalog.rest.s3.cross-region-access-enabled", "true")
   ```
   After that, I got the issue `software.amazon.awssdk.services.s3.model.S3Exception: The AWS Access Key Id you provided does not exist in our records.`. This one I got because my `spark` application was actually making API calls to `aws` proper, not my `minio` service locally. This was resolved once I added the `minio` endpoint, and credentials to the catalog configuration, as I had to my `hadoop` configuration:
   ```
   .config("spark.sql.catalog.rest.s3.endpoint", Variables.MINIO_API_ENDPOINT)
   .config("spark.sql.catalog.rest.s3.access-key-id", AWS_ACCESS_KEY_ID)
   .config("spark.sql.catalog.rest.s3.secret-access-key", AWS_SECRET_ACCESS_KEY)
   .config("spark.sql.catalog.rest.s3.region", AWS_REGION)
   ```
   As for why I could create and delete a iceberg table, and update the schema of an existing iceberg table, but not insert, I don't know. 


-- 
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-unsubscribe@iceberg.apache.org

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


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