yera.cli.setup_handlers.aws
AWS Bedrock provider setup handler.
Symbols
AWSSetup
BaseProviderSetupHandler for configuring AWS Bedrock provider connections.
This class manages the lifecycle of AWS authentication setup, supporting automatic discovery of local ~/.aws/ profiles and manual interactive configuration of profiles and regions.
Methods
AWSSetup.detect_config
detect_config() → AWSConnection | NoneAttempts to automatically detect AWS configuration from local profiles.
Scans the local environment for AWS profiles. If profiles are found, the user is prompted to select one, and the handler attempts to detect the associated region.
Returns
An AWSConnection instance if a profile and region are successfully identified; otherwise, None.
AWSSetup.ask_for_config
ask_for_config() → AWSConnection | NoneInteractively prompts the user to configure an AWS Bedrock connection.
Prompts the user for an AWS profile name (allowing for the default chain) and a target AWS region.
Returns
An AWSConnection instance containing the user-provided profile and region, or None if the user declines the setup.
AWSSetup.validate
validate(
config: AWSConnection,
) → NoneValidates the provided AWS connection configuration.
Verifies the validity of the credentials by attempting to call the AWS
Security Token Service (STS) get_caller_identity method. This ensures
that the profile and region are correctly configured and that the
credentials are active.
Parameters
The AWS connection configuration to validate.
Raises
If the AWS credentials cannot be validated via STS due to BotoCore or Client errors.