@Override
    public List<Region> getRegionsForService(String serviceName) {
        final List<Region> allRegions = getRegions();
        final List<Region> serviceSupportedRegions = new ArrayList<Region>();

        for (Region r : allRegions) {
            if (r.isServiceSupported(serviceName)) {
                serviceSupportedRegions.add(r);
            }
        }
        return serviceSupportedRegions;
    }
Region metadata provider based on partitions.
aws-java-sdk-core/src/main/java/com/amazonaws/partitions/PartitionMetadataProvider.java