Amazon S3 Client connection

303 Views Asked by At

I need to use 2 different S3 clients with different buckets and credentials and I am using the same configuration class for both of them. I have a specific vault ("spring.cloud.vault") that helps me get my credentials (API keys and instance ID) from. The class looks like this:

    @ConfigurationProperties(prefix = "spring.cloud.vault")
    public class Vault{
      private final List<String> paths = new ArrayList<>();
    }

For the first S3 client the connection is successful, but when I try to connect to the second one I receive the error "Access Denied". The problem is that the api key is not switched. Can you help me with this issue?

How to switch between S3 clients

0

There are 0 best solutions below