} else {
LOG.info(">> Searching endpoint for region {}", region);
DescribeRegionsRequest request = new DescribeRegionsRequest().withRegionNames(region);
DescribeRegionsResult result = client.describeRegions(request);
checkArgument(result.getRegions().size() == 1, "Invalid region name %s. Expected one result found %s",
region, result.getRegions());
LOG.info("<< Using endpoint {} for region {}", result.getRegions().get(0).getEndpoint(), region);
client.setEndpoint(result.getRegions().get(0).getEndpoint());