code: private static URI toUri(S3ObjectSummary object)
    {
      final String originalAuthority = object.getBucketName();
      final String originalPath = object.getKey();
      final String authority = originalAuthority.endsWith("/") ?
                               originalAuthority.substring(0, originalAuthority.length() - 1) :
                               originalAuthority;
      final String path = originalPath.startsWith("/") ? originalPath.substring(1) : originalPath;
  
      return URI.create(StringUtils.format("s3://%s/%s", authority, path));
    }
docs: Create an {@link URI} from the given {@link S3ObjectSummary}. The result URI is composed as below.
  
  <pre>
  {@code s3://{BUCKET_NAME}/{OBJECT_KEY}}
  </pre>