# How to configure proxy setting for s3 repository plugins

**URL:** <https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012>\
**Category:** Elasticsearch\
**Created:** [June 22, 2018, 11:08am UTC](https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012 "2018-06-22T11:08:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BKS089](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bks089/32/32876_2.png) [@BKS089](https://discuss.elastic.co/u/BKS089)\
**Post date:** [June 22, 2018, 11:08am UTC](https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012/1 "2018-06-22T11:08:44Z")

</div>

I have configured below setting

echo "proxy.elasticsearch.internal" | ./elasticsearch-keystore add --stdin s3.client.default.proxy.host  
echo "3128" | ./elasticsearch-keystore add --stdin s3.client.default.proxy.port

i am getting below mentioned error  
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to \<bucket\_name\>.s3.amazonaws.com:443 [\<bucket\_name\>.s3.amazonaws.com/52.219.62.40] failed: connect timed out

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [June 23, 2018, 12:28pm UTC](https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012/2 "2018-06-23T12:28:34Z")

</div>

`proxy.host` and `proxy.port` are not secure settings so they can't be stored in keystore and needs to be configured in the repository settings directly through the API.

Only settings marked with `(Secure)` can be stored in keystore. Refer to this [https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/repository-s3-client.html](https://www.elastic.co/guide/en/elasticsearch/plugins/6.3/repository-s3-client.html) for more information

---

<div class="post-metadata">

**Author:** ![BKS089](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bks089/32/32876_2.png) [@BKS089](https://discuss.elastic.co/u/BKS089)\
**Post date:** [July 2, 2018, 12:39pm UTC](https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012/3 "2018-07-02T12:39:02Z")

</div>

can i configure proxy as below api request  
PUT \_snapshot/my\_s3\_repository  
{  
"type": "s3",  
"settings": {  
"bucket": "my\_bucket",  
client: {  
proxy: {  
host: \<PROXY\_IP\>,  
port: \<PROXY\_PORT\>  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [July 2, 2018, 1:06pm UTC](https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012/4 "2018-07-02T13:06:09Z")

</div>

Sorry, my mistake here. Actually, you need to add the following to `elasticsearch.yml` (not using the API as I stated, sorry for this):

```auto
s3.client.default.proxy.host: <proxy_ip>
s3.client.default.proxy.port: <proxy_port>

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 30, 2018, 1:06pm UTC](https://discuss.elastic.co/t/how-to-configure-proxy-setting-for-s3-repository-plugins/137012/5 "2018-07-30T13:06:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
