def METHOD_NAME(self, url: str, fail_on_error: bool, expected_bucket_owner: str):
    try:
        match = re.match(r"s3://(.*?)/(.*)", url)
        if not match or len(match.groups()) < 2:
            self._add_failure(f"s3 url '{url}' is invalid.", FailureLevel.ERROR)
        else:
            bucket_name, object_name = match.group(1), match.group(2)
            AWSApi.instance().s3.head_object(
                bucket_name=bucket_name, object_name=object_name, expected_bucket_owner=expected_bucket_owner
            )
    except AWSClientError as e:
        # Todo: Check that bucket is in s3_read_resource or s3_read_write_resource.
        self._add_failure(
            str(e), FailureLevel.ERROR if expected_bucket_owner or fail_on_error else FailureLevel.WARNING
        )