{"record":{"id":"c03c6566690c018c","repo":"BerriAI/litellm","slug":"missing-boto3-to-call-bedrock-run-pip-install-bo-c03c65","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/files/transformation.py","lineNumber":954,"sourceCode":"    def _sign_s3_request(\n        self,\n        content: str,\n        api_base: str,\n        optional_params: dict,\n        s3_encryption_key_id: str | None = None,\n    ) -> tuple[dict, str]:\n        \"\"\"\n        Sign S3 PUT request using the same proven logic as S3Logger.\n        Reuses the exact pattern from litellm/integrations/s3_v2.py\n        \"\"\"\n        try:\n            import hashlib\n\n            import requests\n            from botocore.auth import S3SigV4Auth\n            from botocore.awsrequest import AWSRequest\n        except ImportError:\n            raise ImportError(\"Missing boto3 to call bedrock. Run 'pip install boto3'.\")\n\n        # Get AWS credentials using existing methods\n        aws_region_name: Final = self._get_aws_region_name(optional_params=optional_params, model=\"\")\n        credentials: Final = self.get_credentials(\n            aws_access_key_id=optional_params.get(\"aws_access_key_id\"),\n            aws_secret_access_key=optional_params.get(\"aws_secret_access_key\"),\n            aws_session_token=optional_params.get(\"aws_session_token\"),\n            aws_region_name=aws_region_name,\n            aws_session_name=optional_params.get(\"aws_session_name\"),\n            aws_profile_name=optional_params.get(\"aws_profile_name\"),\n            aws_role_name=optional_params.get(\"aws_role_name\"),\n            aws_web_identity_token=optional_params.get(\"aws_web_identity_token\"),\n            aws_sts_endpoint=optional_params.get(\"aws_sts_endpoint\"),\n        )\n\n        # Calculate SHA256 hash of the content (REQUIRED for S3)\n        content_hash: Final = hashlib.sha256(content.encode(\"utf-8\")).hexdigest()\n","sourceCodeStart":936,"sourceCodeEnd":972,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/files/transformation.py#L936-L972","documentation":"Error \"Missing boto3 to call bedrock. Run 'pip install boto3'.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/bedrock/files/transformation.py:954 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"}