To resolve "model not found" or "unsupported model" errors in AWS Bedrock, start by verifying the model identifier and region availability. First, confirm the exact model ID you’re using matches the naming conventions in AWS documentation. For example, if you’re trying to access Anthropic’s Claude model, ensure you’re using the correct format like anthropic.claude-v2
and not an outdated or misspelled version. Next, check if the model is supported in your current AWS region. Bedrock models are often limited to specific regions—Claude models, for instance, might only be available in us-east-1
or us-west-2
. Use the AWS CLI command aws bedrock list-foundation-models --region <your-region>
to list models available in your region. If the model isn’t listed, switch regions or request access if the model is in preview.
If the model ID and region are correct, review your IAM permissions and model access settings. Your IAM role or user must have explicit permission to invoke the Bedrock model via a policy that includes bedrock:InvokeModel
(or bedrock:InvokeModelWithResponseStream
for streaming). For example, the policy resource should specify the model ARN (e.g., arn:aws:bedrock:<region>::model/anthropic.claude-v2
). Additionally, some models require explicit enablement in the Bedrock console. For example, AWS Titan models may need manual activation under the "Model access" section of the Bedrock console. If the model is from a third party, like AI21 Labs, ensure you’ve accepted any required terms in the AWS Marketplace or requested access via the Bedrock console.
Finally, check for SDK or CLI version mismatches and AWS service status. Outdated AWS SDKs or CLI versions might not recognize newer models. Update your tools using pip install --upgrade boto3
or aws --version
to confirm compatibility. If the issue persists, use the AWS Health Dashboard to check for regional service outages impacting Bedrock. For unresolved cases, test with a simplified API call (e.g., invokeModel
with minimal parameters) to isolate configuration issues. If all else fails, contact AWS Support with details like the exact error message, model ID, region, and steps to reproduce. For example, include a code snippet like response = bedrock_client.invoke_model(modelId='anthropic.claude-v2', ...)
to help them diagnose the problem.