# Can't access S3 from Elastic Search

**URL:** https://discuss.elastic.co/t/cant-access-s3-from-elastic-search/17467
**Category:** Elasticsearch
**Created:** [May 12, 2014, 8:54pm UTC](https://discuss.elastic.co/t/cant-access-s3-from-elastic-search/17467 "2014-05-12T20:54:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![IronMan2014](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@IronMan2014](https://discuss.elastic.co/u/IronMan2014)
#### Post date: [May 12, 2014, 8:54pm UTC](https://discuss.elastic.co/t/cant-access-s3-from-elastic-search/17467/1 "2014-05-12T20:54:30Z")

</div>

I have a cluster with 2 nodes which works fine.  
I am running the latest Elastic search version, and I would like to use  
snapshot/restore API, but having hard time getting to work. Note, it works  
fine with "fs" type, its AWS I am having hard time with.

In my 2 instances, I have this in the config.yml files

cloud:  
aws:

```
     access_key: XXXXXX

     secret_key: YYYYYYY

discovery: 

    type: ec2

```

I have created S3 bucket called it "my-bucket", Inbound rules allow most  
ports, 22, 80, 9200, 9300

Tried to register the bucket with ElasticSearch:  
PUT /\_snapshot/es\_repository  
{

"type": "s3",

"settings": {

"bucket": "my-bucket"

}

I get this error:

"error": "RemoteTransportException[[node  
2][inet[/10.240.78.87:9300]][cluster/repository/put]]; nested:  
RepositoryException[[elasticsrch] failed to create repository]; nested:  
CreationException[Guice creation errors:\n\n1) Error injecting constructor,  
com.amazonaws.AmazonClientException: Unable to load AWS credentials from  
any provider in the chain\n at  
org.elasticsearch.repositories.s3.S3Repository.()\n at  
org.elasticsearch.repositories.s3.S3Repository\n at  
Key[type=org.elasticsearch.repositories.Repository, annotation=[none]]\n\n1  
error]; nested: AmazonClientException[Unable to load AWS credentials from  
any provider in the chain]; ",

"status": 500

}

Any ideas?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3749a26a-75cb-4ae7-a3bb-8160a7030847%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3749a26a-75cb-4ae7-a3bb-8160a7030847%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [May 12, 2014, 9:06pm UTC](https://discuss.elastic.co/t/cant-access-s3-from-elastic-search/17467/2 "2014-05-12T21:06:12Z")

</div>

May be it's related to this? [https://github.com/elasticsearch/elasticsearch-cloud-aws#recommended-s3-permissions](https://github.com/elasticsearch/elasticsearch-cloud-aws#recommended-s3-permissions)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 12 mai 2014 à 22:54, IronMan2014 [sabdalla80@hotmail.com](mailto:sabdalla80@hotmail.com) a écrit :

I have a cluster with 2 nodes which works fine.  
I am running the latest Elastic search version, and I would like to use snapshot/restore API, but having hard time getting to work. Note, it works fine with "fs" type, its AWS I am having hard time with.

In my 2 instances, I have this in the config.yml files

cloud:  
aws:

```
     access_key: XXXXXX

     secret_key: YYYYYYY

discovery: 

    type: ec2

```

I have created S3 bucket called it "my-bucket", Inbound rules allow most ports, 22, 80, 9200, 9300

Tried to register the bucket with ElasticSearch:

PUT /\_snapshot/es\_repository  
{

"type": "s3",

"settings": {

"bucket": "my-bucket"

}

I get this error:

"error": "RemoteTransportException[[node 2][inet[/10.240.78.87:9300]][cluster/repository/put]]; nested: RepositoryException[[elasticsrch] failed to create repository]; nested: CreationException[Guice creation errors:\n\n1) Error injecting constructor, com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain\n at org.elasticsearch.repositories.s3.S3Repository.()\n at org.elasticsearch.repositories.s3.S3Repository\n at Key[type=org.elasticsearch.repositories.Repository, annotation=[none]]\n\n1 error]; nested: AmazonClientException[Unable to load AWS credentials from any provider in the chain]; ",

"status": 500

}

Any ideas?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3749a26a-75cb-4ae7-a3bb-8160a7030847%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3749a26a-75cb-4ae7-a3bb-8160a7030847%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0F2F0A65-69F5-4581-A3A1-5CAD8010D092%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/0F2F0A65-69F5-4581-A3A1-5CAD8010D092%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:29am UTC](https://discuss.elastic.co/t/cant-access-s3-from-elastic-search/17467/3 "2017-07-06T01:29:58Z")

</div>


