  def GCSToS3(self,
              project_id: str,
              gcs_path: str,
              s3_path: str,
              s3_args: Optional[Dict[str, str]] = None) -> None:
    """Copy an object in GCS to an S3 bucket.

    (Creates a local copy of the file in a temporary directory)

    Args:
      project_id (str): Google Cloud project ID.
      gcs_path (str): File path to the source GCS object.
          Ex: gs://bucket/folder/obj
      s3_path (str): Path to the target S3 bucket.
          Ex: s3://test/bucket
      s3_args (Dict[str, str]): Optional. A dictionary of extra arguments to be
         supplied to the S3 Put call. Useful for specifying encryption
         parameters.
          Ex: {'ServerSideEncryption': "AES256"}

    Raises:
      ResourceCreationError: If the object couldn't be uploaded.
    """
    gcs = gcp_storage.GoogleCloudStorage(project_id)
    if not s3_path.startswith('s3://'):
      s3_path = 's3://' + s3_path
    if not gcs_path.startswith('gs://'):
      gcs_path = 'gs://' + gcs_path
    object_md = gcs.GetObjectMetadata(gcs_path)
    logger.warning(
        'This will download {0:s}b to a local'
        ' temporary directory before uploading it to S3.'
        .format(object_md.get('size', 'Error')))
    localcopy = gcs.GetObject(gcs_path)
    try:
      self.CreateBucket(SplitStoragePath(s3_path)[0])
    except errors.ResourceCreationError as exception:
      if 'already exists' in exception.message:
        logger.info('Target bucket already exists. Reusing.')
      else:
        raise exception
    self.Put(s3_path, localcopy, s3_args)
    logger.info('Attempting to delete local (temporary) copy')
    os.unlink(localcopy)
    logger.info('Done')
Copy an object in GCS to an S3 bucket.

(Creates a local copy of the file in a temporary directory)

Args:
project_id (str): Google Cloud project ID.
gcs_path (str): File path to the source GCS object.
Ex: gs://bucket/folder/obj
s3_path (str): Path to the target S3 bucket.
Ex: s3://test/bucket
s3_args (Dict[str, str]): Optional. A dictionary of extra arguments to be
supplied to the S3 Put call. Useful for specifying encryption
parameters.
Ex: {'ServerSideEncryption': "AES256"}

Raises:
ResourceCreationError: If the object couldn't be uploaded.
libcloudforensics/providers/aws/internal/s3.py