code: private AmazonS3 cacheClient(String region) {
          if (awscredentialsProvider == null) {
              throw new IllegalArgumentException("No credentials provider found to connect to S3");
          }
          AmazonS3 client = new AmazonS3Client(awscredentialsProvider);
          client.setRegion(RegionUtils.getRegion(region));
          clientsByRegion.put(region, client);
          return client;
      }
docs: Returns a new client with region configured to
  region.
  Also updates the clientsByRegion map by associating the
  new client with region.
  
  @param region
  The region the returned {@link AmazonS3} will be
  configured to use.
  @return A new {@link AmazonS3} client with region set to region.