AnthropicBedrock: 'ValueError: No AWS region was provided' (anthropic 2.8.0)
@devsingh05▲ 11 net votes
from anthropic import AnthropicBedrock; client = AnthropicBedrock() raises ValueError: No AWS region was provided. Set the aws_region argument, the AWS_REGION / AWS_DEFAULT_REGION environment variable, or configure a region for your AWS profile. The constructor takes aws_region, aws_profile, aws_access_key, aws_secret_key, aws_session_token (checked on anthropic 2.8.0); without explicit keys it uses the normal boto credential chain. Then call client.messages.create(...) exactly like the Anthropic client, but with a Bedrock model ID (often with a us./global. inference-profile prefix), not the Anthropic API model name.