{"record":{"id":"45d3cf8ad406c5aa","repo":"BerriAI/litellm","slug":"missing-boto3-to-call-bedrock-run-pip-install-bo-45d3cf","errorCode":null,"errorMessage":"Missing boto3 to call bedrock. Run 'pip install boto3'.","messagePattern":"Missing boto3 to call bedrock\\. Run 'pip install boto3'\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/batches/handler.py","lineNumber":203,"sourceCode":"            logging_obj: Optional litellm logging object.\n            **kwargs: Optional AWS credential overrides\n                (``aws_access_key_id``, ``aws_secret_access_key``,\n                ``aws_session_token``, ``aws_profile_name``,\n                ``aws_role_name``, ``aws_session_name``,\n                ``aws_web_identity_token``, ``aws_sts_endpoint``,\n                ``aws_external_id``). Unknown keys are ignored.\n\n        Returns:\n            ``LiteLLMBatch`` shaped like an OpenAI Batch resource. Note that\n            ``request_counts`` is always ``(0, 0, 0)`` because\n            ``GetModelInvocationJob`` does not surface per-record counts;\n            callers that need accurate counts should parse\n            ``manifest.json.out`` from the output S3 prefix.\n        \"\"\"\n        try:\n            import boto3\n        except ImportError as exc:\n            raise ImportError(\"Missing boto3 to call bedrock. Run 'pip install boto3'.\") from exc\n\n        # Resolve region: explicit > parsed-from-ARN > us-east-1 (boto3 default).\n        region: Final = aws_region_name or _extract_region_from_bedrock_arn(batch_id) or \"us-east-1\"\n\n        # Resolve credentials through the same path the rest of the bedrock\n        # provider uses, so model_list / env / role-assumption configs are\n        # honored. We instantiate BedrockBatchesConfig (which extends\n        # BaseAWSLLM) lazily to avoid a circular import at module load.\n        from litellm.llms.bedrock.batches.transformation import BedrockBatchesConfig\n\n        creds: Final = BedrockBatchesConfig().get_credentials(\n            aws_access_key_id=kwargs.get(\"aws_access_key_id\"),\n            aws_secret_access_key=kwargs.get(\"aws_secret_access_key\"),\n            aws_session_token=kwargs.get(\"aws_session_token\"),\n            aws_region_name=region,\n            aws_session_name=kwargs.get(\"aws_session_name\"),\n            aws_profile_name=kwargs.get(\"aws_profile_name\"),\n            aws_role_name=kwargs.get(\"aws_role_name\"),","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/batches/handler.py#L185-L221","documentation":"Error \"Missing boto3 to call bedrock. Run 'pip install boto3'.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/bedrock/batches/handler.py:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install boto3: pip install boto3."],"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"}