# Setting up S3 connection in Dremio via Proxy

**URL:** <https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558>\
**Category:** Uncategorized\
**Created:** [June 2, 2021, 10:20pm UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558 "2021-06-02T22:20:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![librian](https://avatars.discourse-cdn.com/v4/letter/l/f0a364/32.png) [@librian](https://community.dremio.com/u/librian)\
**Post date:** [June 2, 2021, 10:20pm UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558/1 "2021-06-02T22:20:37Z")

</div>

Hi Dremio Community,

We are trying to set up an S3 connection in Dremio via a corporate proxy connection. We have defined the AWS access and secret key and the assumed role.

In addition, we also added the following property in the “Advanced Options” tab.

- fs.s3a.proxy.host
- fs.s3a.proxy.port
- fs.s3a.session.token
- fs.s3a.server-side-encryption-algorithm
- fs.s3a.endpoint
- fs.s3a.aws.credentials.provider

We set the ‘fs.s3a.aws.credentials.provider’ as ‘org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider’.

When we disable the ‘Compatibility Mode’, we are getting an ‘Illegal State Exception’ (see below).

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider

When we enable the ‘Compatibility Mode’, we are getting a NullPointerException.

What could be the issue here? And how should we create a S3 source in Dremio with Proxy?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [June 3, 2021, 7:23am UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558/2 "2021-06-03T07:23:01Z")

</div>

@librian Would like to look at the full stack, are you able to send us the server.log from the coordinator?

---

<div class="post-metadata">

**Author:** ![librian](https://avatars.discourse-cdn.com/v4/letter/l/f0a364/32.png) [@librian](https://community.dremio.com/u/librian)\
**Post date:** [June 3, 2021, 1:12pm UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558/3 "2021-06-03T13:12:47Z")

</div>

The following stacktrace is from the coordinator log when we attempt to create a new S3 source.

```auto
Caused by: java.util.concurrent.TimeoutException: null
        at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771) ~[na:1.8.0_121]
        at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) ~[na:1.8.0_121]
        at com.dremio.exec.catalog.ManagedStoragePlugin.replacePlugin(ManagedStoragePlugin.java:822) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
        at com.dremio.exec.catalog.ManagedStoragePlugin.createOrUpdateSource(ManagedStoragePlugin.java:327) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
        ... 70 common frames omitted
        Suppressed: java.lang.NullPointerException: null
                at com.dremio.exec.store.dfs.FileSystemPlugin.getSourceCapabilities(FileSystemPlugin.java:242) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
                at com.dremio.exec.catalog.ManagedStoragePlugin.setLocals(ManagedStoragePlugin.java:726) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
                at com.dremio.exec.catalog.ManagedStoragePlugin.replacePlugin(ManagedStoragePlugin.java:837) ~[dremio-sabot-kernel-4.1.8-202003120636020140-9c2a6b13.jar:4.1.8-202003120636020140-9c2a6b13]
                ... 71 common frames omitted

```

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [June 5, 2021, 12:18am UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558/4 "2021-06-05T00:18:57Z")

</div>

@librian Are you able to add the below 2 loggers to logback.xml under the conf folder (logger section), restart the coordinator, retry and then once it fails, send us the server.log?

---

<div class="post-metadata">

**Author:** ![librian](https://avatars.discourse-cdn.com/v4/letter/l/f0a364/32.png) [@librian](https://community.dremio.com/u/librian)\
**Post date:** [June 16, 2021, 9:53pm UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558/5 "2021-06-16T21:53:55Z")

</div>

Hi Balaji,

I reset all the configurations and have the following options during s3 data source creation. We are still getting “Connect to sts.us-east-1.amazonaws .com:443 failed: connect timed out”.

fs.s3a.proxy.host  
fs.s3a.proxy.port  
fs.s3a.endpoint

The value for fs.s3a.endpoint is ‘[bucket.vpc-xxxx-xxxx.s3.us-east-1.vpc.amazonaws.com](http://bucket.vpc-xxxx-xxxx.s3.us-east-1.vpc.amazonaws.com)’. I can also see from the code that it defaults to US\_EAST\_1 if the pattern match fails. [dremio-oss/S3FileSystem.java at master · dremio/dremio-oss · GitHub](https://github.com/dremio/dremio-oss/blob/master/plugins/s3/src/main/java/com/dremio/plugins/s3/store/S3FileSystem.java#L551)

Is there a way to tell Dremio to connect to the above custom STS endpoint?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [June 17, 2021, 8:47am UTC](https://community.dremio.com/t/setting-up-s3-connection-in-dremio-via-proxy/7558/6 "2021-06-17T08:47:29Z")

</div>

@librian Please add the loggers mentioned, restart Dremio, try to add the source and then send us the server.log from the coordinator
