BerriAI/litellm · error · ValueError
aws_region_name is required for S3 Vectors
Error message
aws_region_name is required for S3 Vectors
What it means
Configuration guard in the S3 Vectors vector-store config's URL construction: litellm_params carries no aws_region_name, so the regional S3 Vectors endpoint hostname cannot be composed and the request is rejected.
Source
Thrown at litellm/llms/s3_vectors/vector_stores/transformation.py:63
self,
non_default_params: dict,
optional_params: dict,
drop_params: bool,
) -> dict:
for param, value in non_default_params.items():
if param == "max_num_results":
optional_params["maxResults"] = value
return optional_params
def validate_environment(self, headers: dict, litellm_params: GenericLiteLLMParams | None) -> dict:
headers = headers or {}
headers.setdefault("Content-Type", "application/json")
return headers
def get_complete_url(self, api_base: str | None, litellm_params: dict) -> str:
aws_region_name: Final = litellm_params.get("aws_region_name")
if not aws_region_name:
raise ValueError("aws_region_name is required for S3 Vectors")
if not re.match(r"^[a-z][a-z0-9-]*$", aws_region_name):
raise ValueError("Invalid aws_region_name format")
return f"https://s3vectors.{aws_region_name}.api.aws"
def transform_search_vector_store_request(
self,
vector_store_id: str,
query: str | list[str],
vector_store_search_optional_params: VectorStoreSearchOptionalRequestParams,
api_base: str,
litellm_logging_obj: LiteLLMLoggingObj,
litellm_params: dict,
extra_body: dict[str, Any] | None = None,
) -> tuple[str, dict]:
"""Sync version - generates embedding synchronously."""
# For S3 Vectors, vector_store_id should be in format: bucket_name:index_name
# If not in that format, try to construct it from litellm_params
bucket_name: strView on GitHub (pinned to 77b7c6c40c)
Solutions
- Pass aws_region_name in the request or litellm_params.
Example fix
litellm.vector_stores.create(..., aws_region_name="us-east-1")
Defensive patterns
Strategy: validation
When it happens
Trigger: Triggered when calling S3 Vectors without providing aws_region_name.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/d4a417786a18407d.
Report an issue: GitHub.