code: public static AmazonCloudWatch cloudWatch(AWSCredentialsProvider credentials) {
      AmazonCloudWatch client = new AmazonCloudWatchClient(credentials);
      client.setEndpoint(System.getProperty(AwsPropertyKeys.AWS_CLOUD_WATCH_END_POINT.getBundle(),
          "monitoring.amazonaws.com"));
      return client;
    }
docs: Get a CloudWatch client whose endpoint is configured based on properties.