code: private void copyFile(String srcKey, String dstKey, long size)
        throws IOException, InterruptedIOException, AmazonClientException {
      LOG.debug("copyFile {} -> {} ", srcKey, dstKey);
      CopyObjectRequest copyObjectRequest =
          new CopyObjectRequest(mBucket, srcKey, mBucket, dstKey);
      try {
        ObjectMetadata srcmd = getObjectMetadata(srcKey);
        if (srcmd != null) {
          copyObjectRequest.setNewObjectMetadata(srcmd);
        }
        ProgressListener progressListener = new ProgressListener() {
          public void progressChanged(ProgressEvent progressEvent) {
            switch (progressEvent.getEventType()) {
              case TRANSFER_PART_COMPLETED_EVENT:
                break;
              default:
                break;
            }
          }
        };
  
        Copy copy = transfers.copy(copyObjectRequest);
        copy.addProgressListener(progressListener);
        try {
          copy.waitForCopyResult();
        } catch (InterruptedException e) {
          throw new InterruptedIOException("Interrupted copying " + srcKey
              + " to " + dstKey + ", cancelling");
        }
      } catch (AmazonClientException e) {
        throw translateException("copyFile(" + srcKey + ", " + dstKey + ")",
            srcKey, e);
      }
    }
docs: Copy a single object in the bucket via a COPY operation.
  @param srcKey source object path
  @param dstKey destination object path
  @param size object size
  @throws AmazonClientException on failures inside the AWS SDK
  @throws InterruptedIOException the operation was interrupted
  @throws IOException Other IO problems