# Adding Snapshot S3 ECK elastic 8.4.1 cause 302 error

**URL:** <https://discuss.elastic.co/t/adding-snapshot-s3-eck-elastic-8-4-1-cause-302-error/313752>\
**Category:** Elasticsearch\
**Created:** [September 6, 2022, 7:21am UTC](https://discuss.elastic.co/t/adding-snapshot-s3-eck-elastic-8-4-1-cause-302-error/313752 "2022-09-06T07:21:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moscardo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moscardo/32/98529_2.png) [@moscardo](https://discuss.elastic.co/u/moscardo)\
**Post date:** [September 6, 2022, 7:21am UTC](https://discuss.elastic.co/t/adding-snapshot-s3-eck-elastic-8-4-1-cause-302-error/313752/1 "2022-09-06T07:21:01Z")

</div>

Hi,  
I am passing the secrets of the repo to the keystore like:

```auto
spec:
  secureSettings:
  - secretName: s3-secret
    entries:
    - key: access-key
      path: s3.client.default.access_key
    - key: secret-key
      path: s3.client.default.secret_key

```

the S3 server is local (minio) and seems to have no issues when connecting from within ES container. The API call is as following:

```auto
{
	"type": "s3",
	"settings": {
		"client": "default",
		"bucket": "elasticsearch-snapshots",
		"endpoint": "s3.domain.com",
		"path_style_access": "true",
		"protocol": "http"
	}
}

```

but this is the error I get:

```auto
{"error":{"root_cause":[{"type":"repository_exception","reason":"[my-s3] Could not determine repository generation from root blobs"}],"type":"repository_exception","reason":"[my-s3] Could not determine repository generation from root blobs","caused_by":{"type":"i_o_exception","reason":"Exception when listing blobs by prefix [index-]","caused_by":{"type":"amazon_s3_exception","reason":"Found (Service: Amazon S3; Status Code: 302; Error Code: 302 Found; Request ID: null; S3 Extended Request ID: null)"}}},"status":500}

```

---

<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:** [October 4, 2022, 7:21am UTC](https://discuss.elastic.co/t/adding-snapshot-s3-eck-elastic-8-4-1-cause-302-error/313752/2 "2022-10-04T07:21:05Z")

</div>

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