BerriAI/litellm · error · ImportError
Missing botocore to use AWS SigV4 authentication. Run 'pip i
Error message
Missing botocore to use AWS SigV4 authentication. Run 'pip install boto3'.
What it means
The experimental LiteLLM MCP client's AWS SigV4 auth class needs botocore to build SigV4-signed requests (Credentials, STS assume-role). The import is optional: if neither boto3 nor botocore is installed in the environment, __init__ re-raises ImportError with this message before any connection attempt.
Source
Thrown at litellm/experimental_mcp_client/client.py:122
for every outgoing request, enabling per-request signature computation.
"""
requires_request_body = True
def __init__(
self,
aws_access_key_id: str | None = None,
aws_secret_access_key: str | None = None,
aws_session_token: str | None = None,
aws_region_name: str | None = None,
aws_service_name: str | None = None,
aws_role_name: str | None = None,
aws_session_name: str | None = None,
):
try:
from botocore.credentials import Credentials
except ImportError:
raise ImportError("Missing botocore to use AWS SigV4 authentication. Run 'pip install boto3'.")
self.service_name = aws_service_name or "bedrock-agentcore"
self.region_name = aws_region_name or "us-east-1"
# Note: os.environ/ prefixed values are already resolved by
# ProxyConfig._check_for_os_environ_vars() at config load time.
# Values arrive here as plain strings.
if aws_role_name:
self.credentials = self._assume_role(
aws_role_name=aws_role_name,
aws_session_name=aws_session_name,
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
aws_session_token=aws_session_token,
aws_region_name=self.region_name,
)
elif aws_access_key_id and aws_secret_access_key:
self.credentials = Credentials(
access_key=aws_access_key_id,
secret_key=aws_secret_access_key,View on GitHub (pinned to 6c2dcb801b)
Solutions
- pip install boto3 (pulls botocore) in the environment running the litellm proxy / MCP client
- Alternatively install just botocore: pip install botocore, if the full boto3 distribution is unwanted
- Rebuild your Docker image with the extra dependency and restart the proxy
- If AWS SigV4 auth is not actually needed, remove the aws_* fields from the MCP server config so the SigV4 path is never constructed
Example fix
# before pip install litellm # ... AWS SigV4 MCP auth fails with ImportError # after pip install litellm boto3
Defensive patterns
Strategy: validation
Validate before calling
def has_botocore() -> bool:
try:
import botocore.credentials # noqa: F401
return True
except ImportError:
return False
if mcp_auth_uses_sigv4 and not has_botocore():
raise RuntimeError("pip install boto3 before enabling aws_sigv4_auth") Try / catch
try:
from litellm.experimental_mcp_client import MCPClient
except ImportError as e:
if "botocore" in str(e): subprocess.run([sys.executable, '-m', 'pip', 'install', 'boto3']) Prevention
- Add boto3 to requirements when any MCP server uses aws_* auth
- Dockerfile: pip install litellm boto3 for proxy images using Bedrock MCP
When it happens
Trigger: Configuring an MCP server entry with aws_sigv4_auth (aws_access_key_id/aws_secret_access_key, or aws_role_name for assume-role) in a venv where 'pip install botocore' or 'pip install boto3' was never run — e.g. a slim Docker image or a fresh proxy deployment that only installed litellm.
Common situations: Running litellm proxy in a minimal container (python:slim) with only litellm installed; enabling Bedrock AgentCore MCP tools after an env that predates boto3; CI environments trimmed of AWS SDK packages.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- No AWS credentials found. Provide aws_access_key_id and aws_
- streamable_http_client is not available. Please install mcp
- Guardrail {self.guardrail_name or type(self).__name__} imple
- Missing boto3 to call bedrock. Run 'pip install boto3'.
- Missing boto3 to call bedrock. Run 'pip install boto3'.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/d524df11f625a571.
Report an issue: GitHub.