AWSBedrockLLMService: Allow setting auth credentials via env vars

This commit is contained in:
Mark Backman
2025-08-25 10:53:40 -04:00
parent 8250c381d1
commit facfaa2dd4
2 changed files with 16 additions and 12 deletions

View File

@@ -87,12 +87,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Added support to `AWSBedrockLLMService` for setting authentication
credentials through environment variables.
- Updated `SarvamTTSService` to use WebSocket streaming for real-time audio - Updated `SarvamTTSService` to use WebSocket streaming for real-time audio
generation with multiple Indian languages, with HTTP support still available generation with multiple Indian languages, with HTTP support still available
via `SarvamHttpTTSService`. via `SarvamHttpTTSService`.
### Fixed ### Fixed
- Fixed `AWSPollyTTSService` to support AWS credential provider chain (IAM
roles, IRSA, instance profiles) instead of requiring explicit environment
variables.
- Fixed a `CartesiaTTSService` issue that was causing the application to hang - Fixed a `CartesiaTTSService` issue that was causing the application to hang
after Cartesia's 5 minutes timed out. after Cartesia's 5 minutes timed out.
@@ -145,8 +152,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated ### Deprecated
- `FrameProcessor.wait_for_task()` is deprecated. Use `await task` or `await - `FrameProcessor.wait_for_task()` is deprecated. Use `await task` or
asyncio.wait_for(task, timeout)` instead. `await asyncio.wait_for(task, timeout)` instead.
### Removed ### Removed
@@ -160,10 +167,6 @@ asyncio.wait_for(task, timeout)` instead.
### Fixed ### Fixed
- Fixed `AWSPollyTTSService` to support AWS credential provider chain (IAM
roles, IRSA, instance profiles) instead of requiring explicit environment
variables.
- Fixed an issue that would cause `PipelineRunner` and `PipelineTask` to not - Fixed an issue that would cause `PipelineRunner` and `PipelineTask` to not
handle external asyncio task cancellation properly. handle external asyncio task cancellation properly.

View File

@@ -16,6 +16,7 @@ import base64
import copy import copy
import io import io
import json import json
import os
import re import re
from dataclasses import dataclass from dataclasses import dataclass
from typing import Any, Dict, List, Optional from typing import Any, Dict, List, Optional
@@ -761,10 +762,10 @@ class AWSBedrockLLMService(LLMService):
# Store AWS session parameters for creating client in async context # Store AWS session parameters for creating client in async context
self._aws_params = { self._aws_params = {
"aws_access_key_id": aws_access_key, "aws_access_key_id": aws_access_key or os.getenv("AWS_ACCESS_KEY_ID"),
"aws_secret_access_key": aws_secret_key, "aws_secret_access_key": aws_secret_key or os.getenv("AWS_SECRET_ACCESS_KEY"),
"aws_session_token": aws_session_token, "aws_session_token": aws_session_token or os.getenv("AWS_SESSION_TOKEN"),
"region_name": aws_region, "region_name": aws_region or os.getenv("AWS_REGION", "us-east-1"),
"config": client_config, "config": client_config,
} }