code: @Override
      public void delete(String path) throws IOException, URISyntaxException {
          URI uri = new URI(path);
          String bucketName = uri.getHost();
          String key = uri.getPath().substring(1, uri.getPath().length());
  
          List<DeleteObjectsRequest.KeyVersion> keys = new ArrayList<DeleteObjectsRequest.KeyVersion>();
          String marker = null;
          for (;;) {
              ObjectListing ol =
                  s3.listObjects(new ListObjectsRequest().withBucketName(bucketName)
                                                         .withPrefix(key)
                                                         .withMarker(marker));
              for (S3ObjectSummary objectSummary : ol.getObjectSummaries()) {
                  keys.add(new DeleteObjectsRequest.KeyVersion(objectSummary.getKey()));
              }
  
              marker = ol.getNextMarker();
              if (marker == null) {
                  break;
              }
          }
  
          s3.deleteObjects(new DeleteObjectsRequest(bucketName).withKeys(keys));
          s3.deleteObject(bucketName, key);
      }
docs: {@inheritDoc}