def get_all_metadata(
            self,
            bucket: str,
            key: str
    ) -> dict:
        """
        Retrieves all the metadata for a given object in a given bucket.
        :param bucket: the bucket the object resides in.
        :param key: the key of the object for which metadata is being retrieved.
        :return: the metadata
        """
        try:
            return self.s3_client.head_object(
                Bucket=bucket,
                Key=key
            )
        except botocore.exceptions.ClientError as ex:
            if str(ex.response['Error']['Code']) == \
                    str(requests.codes.not_found):
                raise BlobNotFoundError(f"Could not find s3://{bucket}/{key}") from ex
            raise BlobStoreUnknownError(ex)