mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(bedrock_httpx.py): Fix OIDC support.
This commit is contained in:
parent
c301d0c5ca
commit
0ed01f430d
1 changed files with 8 additions and 1 deletions
|
|
@ -275,7 +275,14 @@ class BedrockLLM(BaseLLM):
|
|||
DurationSeconds=3600,
|
||||
)
|
||||
|
||||
return sts_response["Credentials"]
|
||||
session = boto3.Session(
|
||||
aws_access_key_id=sts_response["Credentials"]["AccessKeyId"],
|
||||
aws_secret_access_key=sts_response["Credentials"]["SecretAccessKey"],
|
||||
aws_session_token=sts_response["Credentials"]["SessionToken"],
|
||||
region_name=aws_region_name,
|
||||
)
|
||||
|
||||
return session.get_credentials()
|
||||
elif aws_role_name is not None and aws_session_name is not None:
|
||||
sts_client = boto3.client(
|
||||
"sts",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue