litellm - 💡(How to fix) Fix [Bug]: LiteLLM cache init ignores AWS role for Bedrock [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#28244Fetched 2026-05-20 03:40:34
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Timeline (top)
labeled ×3

Error Message

  1. Observe: Cache initialization fails with bedrock:InvokeModel is not authorized error, even though the model's configured role has Bedrock permissions
  2. Verify: The error shows the pod's default role (assumed-role/k8s-app-litellm..../botocore-session-xxxx) is being used instead of the cross-account role specified in aws_role_arn.

Root Cause

When configuring a Bedrock embedding model with aws_role_arn for cross-account access, LiteLLM's Redis semantic cache initialization bypasses that role configuration and attempts to invoke Bedrock using the pod's default IAM role instead. This causes authorization failures because the default role lacks Bedrock permissions, even though the model's configured role has them. The cache init should respect and assume the model's specified role before attempting embeddings, but currently it doesn't, making cross-account Bedrock semantic caching impossible without also granting the default pod role direct Bedrock access.

RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When configuring a Bedrock embedding model with aws_role_arn for cross-account access, LiteLLM's Redis semantic cache initialization bypasses that role configuration and attempts to invoke Bedrock using the pod's default IAM role instead. This causes authorization failures because the default role lacks Bedrock permissions, even though the model's configured role has them. The cache init should respect and assume the model's specified role before attempting embeddings, but currently it doesn't, making cross-account Bedrock semantic caching impossible without also granting the default pod role direct Bedrock access.

Steps to Reproduce

  1. Create a Bedrock embedding model in a separate AWS account (Account B) with cross-account access
  2. Configure k8s pod with IAM role in Account A that only has sts:AssumeRole permission to the cross-account role in Account B
  3. Configure LiteLLM model with aws_role_arn pointing to the cross-account role in Account B
  4. Enable Redis semantic cache in config.yaml, specifying the Bedrock model as redis_semantic_cache_embedding_model
  5. Start the LiteLLM proxy
  6. Observe: Cache initialization fails with bedrock:InvokeModel is not authorized error, even though the model's configured role has Bedrock permissions
  7. Verify: The error shows the pod's default role (assumed-role/k8s-app-litellm..../botocore-session-xxxx) is being used instead of the cross-account role specified in aws_role_arn.

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.83.14

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: LiteLLM cache init ignores AWS role for Bedrock [1 participants]