{"record":{"id":"b2825484965e3294","repo":"home-assistant/core","slug":"invalid-endpoint-url","errorCode":"invalid_endpoint_url","errorMessage":"Invalid endpoint URL. Please make sure it's a valid AWS S3 endpoint URL.","messagePattern":"Invalid endpoint URL\\. Please make sure it's a valid AWS S3 endpoint URL\\.","errorType":"exception","errorClass":"ConfigEntryError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/aws_s3/__init__.py","lineNumber":54,"sourceCode":"            \"s3\",\n            endpoint_url=data.get(CONF_ENDPOINT_URL),\n            aws_secret_access_key=data[CONF_SECRET_ACCESS_KEY],\n            aws_access_key_id=data[CONF_ACCESS_KEY_ID],\n        ).__aenter__()\n        await client.head_bucket(Bucket=data[CONF_BUCKET])\n    except ClientError as err:\n        raise ConfigEntryError(\n            translation_domain=DOMAIN,\n            translation_key=\"invalid_credentials\",\n        ) from err\n    except ParamValidationError as err:\n        if \"Invalid bucket name\" in str(err):\n            raise ConfigEntryError(\n                translation_domain=DOMAIN,\n                translation_key=\"invalid_bucket_name\",\n            ) from err\n    except ValueError as err:\n        raise ConfigEntryError(\n            translation_domain=DOMAIN,\n            translation_key=\"invalid_endpoint_url\",\n        ) from err\n    except ConnectionError as err:\n        raise ConfigEntryNotReady(\n            translation_domain=DOMAIN,\n            translation_key=\"cannot_connect\",\n        ) from err\n\n    coordinator = S3DataUpdateCoordinator(\n        hass,\n        entry=entry,\n        client=client,\n    )\n    await coordinator.async_config_entry_first_refresh()\n    entry.runtime_data = coordinator\n\n    def notify_backup_listeners() -> None:","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/aws_s3/__init__.py#L36-L72","documentation":"Raised as ConfigEntryError (translation_key invalid_endpoint_url) by aws_s3 when creating the S3 client or calling head_bucket raises ValueError — botocore/awscrt rejects the configured endpoint_url because it is not a parseable URL (no scheme, malformed host, unsupported scheme).","triggerScenarios":"data[CONF_ENDPOINT_URL] is something like 'my-minio:9000' (missing http://), 'ftp://x', contains whitespace, or is a bare hostname; botocore's URL parsing raises ValueError before any network call.","commonSituations":"MinIO/other S3-compatible backends configured for the first time; user copied host:port from a docker-compose file without the scheme; trailing newline/space in a pasted URL.","solutions":["Enter the full endpoint URL including scheme, e.g. http://192.168.1.10:9000 or https://minio.example.com.","Trim whitespace and confirm the port is right; HTTPS requires a valid TLS cert on the endpoint (or use http for local LAN services).","For AWS itself, leave the endpoint URL empty — it is optional."],"exampleFix":"# before\nendpoint_url: 192.168.1.10:9000\n# after\nendpoint_url: http://192.168.1.10:9000\n","handlingStrategy":"validation","validationCode":"from urllib.parse import urlparse\n\ndef valid_endpoint_url(url: str | None) -> bool:\n    if not url:\n        return True  # optional for AWS\n    parsed = urlparse(url)\n    return parsed.scheme in (\"http\", \"https\") and bool(parsed.netloc)\n","typeGuard":null,"tryCatchPattern":"try:\n    client = await session.create_client(\"s3\", endpoint_url=url, ...).__aenter__()\nexcept ValueError:\n    # endpoint is not a valid URL; fix the config, do not retry\n    raise ConfigEntryError(translation_key=\"invalid_endpoint_url\")","preventionTips":["Always include http:// or https:// in custom endpoints.","Trim whitespace when users paste endpoint URLs into config flows.","Use https for anything leaving the LAN; ensure the endpoint's cert is valid."],"tags":["home-assistant","aws","s3","endpoint","validation","minio"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}