Summary
The article discusses an issue related to adding a cross-account S3 source in Dremio, where an error occurs due to conflicting configuration settings for the AWS region.
Reported Issue
When attempting to add a cross-account S3 source in Dremio, the following error is encountered:
Exception encountered: Could not connect to S3 source. Check your S3 data source settings and credentials.,stack_trace:com.dremio.common.exceptions.UserException: Could not connect to S3 source. Check your S3 data source settings and credentials. Caused by: java.util.concurrent.ExecutionException: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: com.dremio.plugins.s3.store.STSCredentialProviderV1 instantiation exception: java.lang.IllegalStateException: Only one of Region or EndpointConfiguration may be set.
Relevant Versions
Add additional content.
Troubleshooting Steps
Add additional content.
Cause
The error occurs when both dremio.s3.region AND fs.s3a.assumed.role.sts.endpoint.region are set in the core-site.xml (or dremio.conf). According to the error message, "Only one of Region or EndpointConfiguration may be set."
Steps to Resolve
1. Remove fs.s3a.assumed.role.sts.endpoint.region from the core-site.xml (or dremio.conf).
2. Set dremio.s3.region, with the variable as AWS_STS_REGIONAL_ENDPOINTS=regional. 3. Restart Dremio.