BerriAI/litellm · error · ImportError

boto3 is required for Bedrock ingestion. Install with: pip i

Error message

boto3 is required for Bedrock ingestion. Install with: pip install boto3

What it means

Missing-dependency error from _get_boto3_client: the optional boto3 package is not installed, so no AWS client can be built for bedrock-agent/OpenSearch operations. Install boto3 (it also provides the credential chain BaseAWSLLM relies on) and retry.

Source

Thrown at litellm/rag/ingestion/bedrock_ingestion.py:581

                "type": "S3",
                "s3Configuration": {
                    "bucketArn": f"arn:aws:s3:::{self.s3_bucket}",
                    "inclusionPrefixes": [self.s3_prefix],
                },
            },
        )
        ds_id: Final = response["dataSource"]["dataSourceId"]
        self._created_resources["data_source"] = ds_id

        verbose_logger.info("Created Data Source: %s", ds_id)
        return ds_id

    def _get_boto3_client(self, service_name: str):
        """Get a boto3 client for the specified service using BaseAWSLLM auth."""
        try:
            import boto3
        except ImportError:
            raise ImportError("boto3 is required for Bedrock ingestion. Install with: pip install boto3")

        # Get credentials using BaseAWSLLM's get_credentials method
        credentials: Final = self.get_credentials(
            aws_access_key_id=_get_str_or_none(self.vector_store_config.get("aws_access_key_id")),
            aws_secret_access_key=_get_str_or_none(self.vector_store_config.get("aws_secret_access_key")),
            aws_session_token=_get_str_or_none(self.vector_store_config.get("aws_session_token")),
            aws_region_name=self.aws_region_name,
            aws_session_name=_get_str_or_none(self.vector_store_config.get("aws_session_name")),
            aws_profile_name=_get_str_or_none(self.vector_store_config.get("aws_profile_name")),
            aws_role_name=_get_str_or_none(self.vector_store_config.get("aws_role_name")),
            aws_web_identity_token=_get_str_or_none(self.vector_store_config.get("aws_web_identity_token")),
            aws_sts_endpoint=_get_str_or_none(self.vector_store_config.get("aws_sts_endpoint")),
            aws_external_id=_get_str_or_none(self.vector_store_config.get("aws_external_id")),
        )

        # Create session with credentials
        session: Final = boto3.Session(
            aws_access_key_id=credentials.access_key,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Install boto3: pip install boto3.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/rag/ingestion/bedrock_ingestion.py:581 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/dd0d45d943923d42. Report an issue: GitHub.