{"record":{"id":"d98909b77961638e","repo":"BerriAI/litellm","slug":"invalid-aws-region-name-format","errorCode":null,"errorMessage":"Invalid aws_region_name format","messagePattern":"Invalid aws_region_name format","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/s3_vectors/vector_stores/transformation.py","lineNumber":65,"sourceCode":"        optional_params: dict,\n        drop_params: bool,\n    ) -> dict:\n        for param, value in non_default_params.items():\n            if param == \"max_num_results\":\n                optional_params[\"maxResults\"] = value\n        return optional_params\n\n    def validate_environment(self, headers: dict, litellm_params: GenericLiteLLMParams | None) -> dict:\n        headers = headers or {}\n        headers.setdefault(\"Content-Type\", \"application/json\")\n        return headers\n\n    def get_complete_url(self, api_base: str | None, litellm_params: dict) -> str:\n        aws_region_name: Final = litellm_params.get(\"aws_region_name\")\n        if not aws_region_name:\n            raise ValueError(\"aws_region_name is required for S3 Vectors\")\n        if not re.match(r\"^[a-z][a-z0-9-]*$\", aws_region_name):\n            raise ValueError(\"Invalid aws_region_name format\")\n        return f\"https://s3vectors.{aws_region_name}.api.aws\"\n\n    def transform_search_vector_store_request(\n        self,\n        vector_store_id: str,\n        query: str | list[str],\n        vector_store_search_optional_params: VectorStoreSearchOptionalRequestParams,\n        api_base: str,\n        litellm_logging_obj: LiteLLMLoggingObj,\n        litellm_params: dict,\n        extra_body: dict[str, Any] | None = None,\n    ) -> tuple[str, dict]:\n        \"\"\"Sync version - generates embedding synchronously.\"\"\"\n        # For S3 Vectors, vector_store_id should be in format: bucket_name:index_name\n        # If not in that format, try to construct it from litellm_params\n        bucket_name: str\n        index_name: str\n","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/s3_vectors/vector_stores/transformation.py#L47-L83","documentation":"Format guard in the S3 Vectors config: aws_region_name was supplied but does not match the expected AWS region format, so embedding it into the endpoint URL would produce an invalid address; validation fails before the request is built.","triggerScenarios":"Triggered when the aws_region_name provided for S3 Vectors does not match a valid AWS region format.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid AWS region like 'us-east-1' or 'eu-west-1'.","Check for typos in aws_region_name."],"exampleFix":"aws_region_name=\"us-east-1\"","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}