# Opensearch repository-s3 plugin trouble with AWS region after upgrade

**URL:** <https://forum.opensearch.org/t/opensearch-repository-s3-plugin-trouble-with-aws-region-after-upgrade/15510>\
**Category:** Reporting Plugin\
**Tags:** troubleshoot, configure, upgrade\
**Created:** [August 11, 2023, 10:45am UTC](https://forum.opensearch.org/t/opensearch-repository-s3-plugin-trouble-with-aws-region-after-upgrade/15510 "2023-08-11T10:45:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hm2thr33](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@hm2thr33](https://forum.opensearch.org/u/hm2thr33)\
**Post date:** [August 11, 2023, 10:45am UTC](https://forum.opensearch.org/t/opensearch-repository-s3-plugin-trouble-with-aws-region-after-upgrade/15510/1 "2023-08-11T10:45:31Z")

</div>

Hi!

Аfter updating OpenSearch 2.8.0 to 2.9.0, the functionality of repository-s3 plugin weird.

Here is the log I get after requesting to view snapshots in backet (region eu-central-1):

```auto
{"error":{"root_cause":[{"type":"s3_exception","reason":"s3_exception: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. (Service: S3, Status Code: 301, Request ID: C7H33WRXPBJHZ13W, Extended Request ID: zGWpu6uRVVQ4jLHwddWZpji1Rhlo57BBIFbqrUWk1r5kfGyR+sEwzsuolCq9cZ2mAqbKKZcWiHA=)"}],"type":"repository_exception","reason":"[backup.opensearch] Unexpected exception when loading repository data","caused_by":{"type":"s3_exception","reason":"s3_exception: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. (Service: S3, Status Code: 301, Request ID: C7H33WRXPBJHZ13W, Extended Request ID: zGWpu6uRVVQ4jLHwddWZpji1Rhlo57BBIFbqrUWk1r5kfGyR+sEwzsuolCq9cZ2mAqbKKZcWiHA=)"}},"status":500}

```

On the part of AWS S3 Bucket to which the cluster is connected, there were no changes. Credentials worked fine.

Аfter trying to add an S3 bucket with some different combinations I saw the following log:

```auto
"reason": "The authorization header is malformed; the region 'eu-central-1' is wrong; expecting 'us-east-1' (Service: S3, Status Code: 400, Request ID: BETMPMA86J7Q7CTH, Extended Request ID: vzSJCEIEwoZRRFkiEsKX7n/tk86XEkUnHFN28M1qxvQlrvHf7/X7NBrLSDlVpyupRoayeSfJUb8=)"

```

Why i can’t use my bucket in eu-central-1 region after upgrade to 2.9.0 version of Opensearch?

---

<div class="post-metadata">

**Author:** ![sblatnjak](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sblatnjak](https://forum.opensearch.org/u/sblatnjak)\
**Post date:** [November 16, 2023, 11:34am UTC](https://forum.opensearch.org/t/opensearch-repository-s3-plugin-trouble-with-aws-region-after-upgrade/15510/2 "2023-11-16T11:34:55Z")

</div>

> [@hm2thr33](#):
>
> `The bucket you are attempting to access must be addressed using the specified endpoint`

2.9 has changed discovery-ec2 and repository-s3 plugins to AWS SDK v2. [Add amazon\_s3\_region to gradle check CI/CD · Issue #3615 · opensearch-project/opensearch-build · GitHub](https://github.com/opensearch-project/opensearch-build/issues/3615)  
Did you try setting

```auto
s3.client.default.region: 

```

> **[Take and restore snapshots](https://opensearch.org/docs/2.9/tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore/)**
>
> Take and restore snapshots
