{"record":{"id":"04f55e4f4e45c060","repo":"BerriAI/litellm","slug":"missing-boto3-to-call-aws-polly-run-pip-install","errorCode":null,"errorMessage":"Missing boto3 to call AWS Polly. Run 'pip install boto3'.","messagePattern":"Missing boto3 to call AWS Polly\\. Run 'pip install boto3'\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"litellm/llms/aws_polly/text_to_speech/transformation.py","lineNumber":267,"sourceCode":"        return \"<speak>\" in input or \"<speak \" in input\n\n    def _sign_polly_request(\n        self,\n        request_body: dict[str, Any],\n        endpoint_url: str,\n        litellm_params: dict,\n    ) -> tuple[dict[str, str], str]:\n        \"\"\"\n        Sign the AWS Polly request using SigV4.\n\n        Returns:\n            Tuple of (signed_headers, json_body_string)\n        \"\"\"\n        try:\n            from botocore.auth import SigV4Auth\n            from botocore.awsrequest import AWSRequest\n        except ImportError:\n            raise ImportError(\"Missing boto3 to call AWS Polly. Run 'pip install boto3'.\")\n\n        # Get AWS region\n        aws_region_name: Final = litellm_params.get(\"aws_region_name\", self.DEFAULT_REGION)\n\n        # Get AWS credentials\n        credentials: Final = self.get_credentials(\n            aws_access_key_id=litellm_params.get(\"aws_access_key_id\"),\n            aws_secret_access_key=litellm_params.get(\"aws_secret_access_key\"),\n            aws_session_token=litellm_params.get(\"aws_session_token\"),\n            aws_region_name=aws_region_name,\n            aws_session_name=litellm_params.get(\"aws_session_name\"),\n            aws_profile_name=litellm_params.get(\"aws_profile_name\"),\n            aws_role_name=litellm_params.get(\"aws_role_name\"),\n            aws_web_identity_token=litellm_params.get(\"aws_web_identity_token\"),\n            aws_sts_endpoint=litellm_params.get(\"aws_sts_endpoint\"),\n            aws_external_id=litellm_params.get(\"aws_external_id\"),\n        )\n","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/aws_polly/text_to_speech/transformation.py#L249-L285","documentation":"Error \"Missing boto3 to call AWS Polly. Run 'pip install boto3'.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/aws_polly/text_to_speech/transformation.py:267 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":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}