Skip to content

Conversation

@TamaryOmer
Copy link

Summary

Adds support for AWS session tokens in the Nova Sonic speech-to-speech service integration, enabling
authentication with temporary AWS credentials.

Changes

  • Removed explicit credential parameters: No longer requires secret_access_key, access_key_id, or
    session_token in constructor
  • Added environment credential resolver: Uses EnvironmentCredentialsResolver to automatically detect
    credentials from: Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN), IAM roles , AWS credential files or other standard AWS credential sources
    Updated dependencies: Added smithy-aws-core for credential resolution
    Simplified configuration: Removed manual credential management code

Benefits

Automatic session token support: Works seamlessly with temporary credentials
Follows AWS best practices: Uses standard AWS credential chain
Reduced complexity: No need to manually pass credentials
Better security: Supports IAM roles and other secure credential methods

Breaking Changes

• Constructor no longer accepts secret_access_key, access_key_id, or session_token parameters
• Credentials must now be provided via environment variables or other AWS standard methods

Migration

Before:
python

llm = AWSNovaSonicLLMService(
    secret_access_key="...",
    access_key_id="...",
    session_token="...",  # optional
    region="us-east-1"
)

After:

python
# Set environment variables or use IAM roles
llm = AWSNovaSonicLLMService(
    region="us-east-1"  # region now defaults to us-east-1
)

@markbackman
Copy link
Contributor

Thanks for the submission. This unfortunately makes a breaking change that will impact developers using AWSNovaSonicLLMService. We're happy to support this pattern, but it needs to work with the current authentication scheme as well and can't be a breaking change. If that's something you're interested in submitting, we can review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants