code: private HostAddress findClusterHostAddress(UrlParser urlParser) throws SQLException {
      List<HostAddress> hostAddresses = urlParser.getHostAddresses();
      Matcher matcher;
      for (HostAddress hostAddress : hostAddresses) {
        matcher = auroraDnsPattern.matcher(hostAddress.host);
        if (matcher.find()) {
  
          if (clusterDnsSuffix != null) {
            //ensure there is only one cluster
            if (!clusterDnsSuffix.equalsIgnoreCase(matcher.group(3))) {
              throw new SQLException("Connection string must contain only one aurora cluster. "
                  + "'" + hostAddress.host + "' doesn't correspond to DNS prefix '" + clusterDnsSuffix
                  + "'");
            }
          } else {
            clusterDnsSuffix = matcher.group(3);
          }
  
          if (matcher.group(2) != null && !matcher.group(2).isEmpty()) {
            //not just an instance entry-point, but cluster entrypoint.
            return hostAddress;
          }
        } else {
          if (clusterDnsSuffix == null
              && hostAddress.host.contains(".")
              && !Utils.isIPv4(hostAddress.host)
              && !Utils.isIPv6(hostAddress.host)) {
            clusterDnsSuffix = hostAddress.host.substring(hostAddress.host.indexOf(".") + 1);
          }
        }
      }
      return null;
    }
docs: Retrieves the cluster host address from the UrlParser instance.
  
  @param urlParser object that holds the connection information
  @return cluster host address