How to use more than one S3 config?

We are currently using Amazon S3 for snapshots, but am investigating the possibility of using a S3-compatible solution instead. When looking at the docs here: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-s3-client.html#repository-s3-compatible-services we are wondering if there is a way to setup multiple S3 stores and thus multiple credentials?

In the docs, specifically for

bin/elasticsearch-keystore add s3.client.default.access_key
bin/elasticsearch-keystore add s3.client.default.secret_key

It doesn’t appear that these keys are tied to the repository and rather they appear to be tied to S3 directly.

  1. Is it possible to have multiple S3 config?
  2. If so, how do I do it?

Thanks!

Yes. Quoting these docs:

The client that you use to connect to S3 has a number of settings available. The settings have the form s3.client.CLIENT_NAME.SETTING_NAME . By default, s3 repositories use a client named default , but this can be modified using the repository setting client.

So replace the default in your settings with some other name (e.g. s3.client.special.access_key) and include "client": "special" in your repository definition.

Thank you — this works!

1 Like

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