BerriAI/litellm · error · ImportError
Missing boto3 to call S3. Run 'pip install boto3'.
Error message
Missing boto3 to call S3. Run 'pip install boto3'.
What it means
Dependency guard in the S3 v2 integration: importing botocore (shipped with boto3) failed, so the SigV4-signed S3 download path is unavailable; the message points at 'pip install boto3'.
Solutions
- Install boto3 with: pip install boto3.
Example fix
pip install boto3
Defensive patterns
Strategy: validation
When it happens
Trigger: Enabling S3 (v2) logging without boto3 installed.
Common situations: Optional dependency missing in the container/venv running litellm.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/c5f8f4e439e1655b.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/integrations/s3_v2.py:589
async def _download_object_from_s3(self, s3_object_key: str) -> dict | None:
"""
Download and parse JSON object from S3.
Args:
s3_object_key: The S3 object key to download
Returns:
Optional[dict]: The parsed JSON object or None if not found/error
"""
try:
import hashlib
import requests
from botocore.auth import S3SigV4Auth
from botocore.awsrequest import AWSRequest
except ImportError:
raise ImportError("Missing boto3 to call S3. Run 'pip install boto3'.")
try:
from litellm.litellm_core_utils.asyncify import asyncify
# Get AWS credentials
asyncified_get_credentials: Final = asyncify(self.get_credentials)
credentials: Final = await asyncified_get_credentials(
aws_access_key_id=self.s3_aws_access_key_id,
aws_secret_access_key=self.s3_aws_secret_access_key,
aws_session_token=self.s3_aws_session_token,
aws_region_name=self.s3_region_name,
aws_session_name=self.s3_aws_session_name,
aws_profile_name=self.s3_aws_profile_name,
aws_role_name=self.s3_aws_role_name,
aws_web_identity_token=self.s3_aws_web_identity_token,
aws_sts_endpoint=self.s3_aws_sts_endpoint,
)
View on GitHub (pinned to 77b7c6c40c)