{"record":{"id":"90179efc7c8e554b","repo":"BerriAI/litellm","slug":"s3-bucket-name-is-required-set-s3-bucket-name-i","errorCode":null,"errorMessage":"S3 bucket_name is required. Set 's3_bucket_name' in proxy config or AWS_S3_BUCKET_NAME for Bedrock file content retrieval.","messagePattern":"S3 bucket_name is required\\. Set 's3_bucket_name' in proxy config or AWS_S3_BUCKET_NAME for Bedrock file content retrieval\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/files/transformation.py","lineNumber":206,"sourceCode":"    trusted_model_credentials: Final = litellm_params.get(\"_litellm_internal_model_credentials\")\n    if not isinstance(trusted_model_credentials, MappingProxyType):\n        return _TrustedS3ModelCredentials()\n    snapshot: Final[dict[str, object]] = {}\n    snapshot.update(trusted_model_credentials)  # any-ok: untyped snapshot\n    return _TrustedS3ModelCredentials.model_validate(snapshot)\n\n\ndef get_configured_s3_bucket_name(litellm_params: Mapping[str, object]) -> str:\n    \"\"\"\n    Resolve the server-configured S3 bucket for Bedrock file operations.\n\n    Only trusts the immutable server-side credential snapshot or the\n    environment; never a request-supplied param, since the bucket is what\n    `validate_managed_cloud_file_id` checks file ids against.\n    \"\"\"\n    bucket_name: Final = _trusted_s3_model_credentials(litellm_params).s3_bucket_name or os.getenv(\"AWS_S3_BUCKET_NAME\")\n    if not bucket_name:\n        raise ValueError(_S3_BUCKET_REQUIRED_ERROR)\n    return bucket_name\n\n\ndef get_configured_s3_bucket_names(litellm_params: Mapping[str, object]) -> tuple[str, ...]:\n    \"\"\"\n    Resolve the server-configured S3 buckets a Bedrock file id may live in.\n\n    Bedrock batch outputs land in ``s3_output_bucket_name`` when it differs from\n    the input bucket, so retrieval validates against both. Same trust rules as\n    ``get_configured_s3_bucket_name``: only the immutable credential snapshot or\n    the environment, never a request param.\n    \"\"\"\n    trusted: Final = _trusted_s3_model_credentials(litellm_params)\n    input_bucket: Final = trusted.s3_bucket_name or os.getenv(\"AWS_S3_BUCKET_NAME\")\n    output_bucket: Final = trusted.s3_output_bucket_name or os.getenv(\"AWS_S3_OUTPUT_BUCKET_NAME\")\n    buckets: Final = tuple(dict.fromkeys(bucket for bucket in (input_bucket, output_bucket) if bucket))\n    if not buckets:\n        raise ValueError(_S3_BUCKET_REQUIRED_ERROR)","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/files/transformation.py#L188-L224","documentation":"Configuration guard for Bedrock file content retrieval: no S3 bucket name could be resolved from the server-side proxy config ('s3_bucket_name' in litellm_params) or AWS_S3_BUCKET_NAME env var, so there is no destination bucket for file operations.","triggerScenarios":"Thrown at litellm/llms/bedrock/files/transformation.py:206 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set s3_bucket_name in the proxy config.","Set the AWS_S3_BUCKET_NAME environment variable.","Pass s3_bucket_name in the request params."],"exampleFix":null,"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-23T08:17:48.524Z"}