{"record":{"id":"fae6818f7632da4c","repo":"BerriAI/litellm","slug":"unable-to-parse-s3-url-https-url","errorCode":null,"errorMessage":"Unable to parse S3 URL: {https_url}","messagePattern":"Unable to parse S3 URL: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/files/transformation.py","lineNumber":1067,"sourceCode":"            key = unquote(key)\n            s3_uri = f\"s3://{bucket}/{key}\"\n        elif match2:\n            # Pattern: https://bucket.s3.region.amazonaws.com/key\n            bucket, region, key = match2.groups()\n            key = unquote(key)\n            s3_uri = f\"s3://{bucket}/{key}\"\n        else:\n            # Fallback: try to extract bucket and key from URL path\n            from urllib.parse import urlparse\n\n            parsed: Final = urlparse(https_url)\n            path_parts: Final = parsed.path.lstrip(\"/\").split(\"/\", 1)\n            if len(path_parts) >= 2:\n                bucket, key = path_parts[0], path_parts[1]\n                key = unquote(key)\n                s3_uri = f\"s3://{bucket}/{key}\"\n            else:\n                raise ValueError(f\"Unable to parse S3 URL: {https_url}\")\n\n        # Extract filename from key\n        filename: Final = key.split(\"/\")[-1] if \"/\" in key else key\n\n        return s3_uri, filename\n\n    def transform_create_file_response(\n        self,\n        model: str | None,\n        raw_response: Response,\n        logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n    ) -> OpenAIFileObject:\n        \"\"\"\n        Transform S3 File upload response into OpenAI-style FileObject\n        \"\"\"\n        # For S3 uploads, we typically get an ETag and other metadata\n        response_headers: Final = raw_response.headers","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/files/transformation.py#L1049-L1085","documentation":"Error \"Unable to parse S3 URL: {https_url}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/bedrock/files/transformation.py:1067 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a valid S3 HTTPS URL."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}