  def Put(
      self,
      s3_path: str,
      filepath: str,
      extra_args: Optional[Dict[str, str]] = None) -> None:
    """Upload a local file to an S3 bucket.

    Keeps the local filename intact.

    Args:
      s3_path (str): Path to the target S3 bucket.
          Ex: s3://test/bucket
      filepath (str): Path to the file to be uploaded.
          Ex: /tmp/myfile
      extra_args (Dict[str, str]): Optional. A dictionary of extra arguments
        that will be directly supplied to the upload_file call.  Useful for
        specifying encryption parameters.
          Ex: {'ServerSideEncryption': "AES256"}
    Raises:
      ResourceCreationError: If the object couldn't be uploaded.
      ResourceNotFoundError: If the file could not be found.
    """
    client = self.aws_account.ClientApi(common.S3_SERVICE)
    if not s3_path.startswith('s3://'):
      s3_path = 's3://' + s3_path
    if not s3_path.endswith('/'):
      s3_path = s3_path + '/'
    try:
      (bucket, path) = SplitStoragePath(s3_path)
      client.upload_file(
          filepath,
          bucket,
          '{0:s}{1:s}'.format(path, os.path.basename(filepath)),
          ExtraArgs=extra_args)
    except FileNotFoundError as exception:
      raise errors.ResourceNotFoundError(
          'Could not upload file {0:s}: {1:s}'.format(
              filepath, str(exception)),
          __name__) from exception
    except client.exceptions.ClientError as exception:
      raise errors.ResourceCreationError(
          'Could not upload file {0:s}: {1:s}'.format(
              filepath, str(exception)),
          __name__) from exception
Upload a local file to an S3 bucket.

Keeps the local filename intact.

Args:
s3_path (str): Path to the target S3 bucket.
Ex: s3://test/bucket
filepath (str): Path to the file to be uploaded.
Ex: /tmp/myfile
extra_args (Dict[str, str]): Optional. A dictionary of extra arguments
that will be directly supplied to the upload_file call.  Useful for
specifying encryption parameters.
Ex: {'ServerSideEncryption': "AES256"}
Raises:
ResourceCreationError: If the object couldn't be uploaded.
ResourceNotFoundError: If the file could not be found.
libcloudforensics/providers/aws/internal/s3.py