Bedrock Runtime: InvokeModel, https response error StatusCode: 403, RequestID: 3...
错误信息
InvokeModel: operation error Bedrock Runtime: InvokeModel, https response error StatusCode: 403, RequestID: 3c8d1b0c-1a09-4e7e-9564-8ca3195c950e, AccessDeniedException: anthropic.claude-fable-5 is not available for this account. You can explore other available models on Amazon Bedrock. For additional access options, contact AWS Sales at https://aws.amazon.com/contact-us/sales-support/
AI 解决方案
## 🔍 报错分析
1. 🌐 错误翻译
原文:InvokeModel: operation error Bedrock Runtime: InvokeModel, https response error StatusCode: 403, RequestID: 3c8d1b0c-1a09-4e7e-9564-8ca3195c950e, AccessDeniedException: anthropic.claude-fable-5 is not available for this account. You can explore other available models on Amazon Bedrock. For additional access options, contact AWS Sales at https://aws.amazon.com/contact-us/sales-support/
译文:InvokeModel:操作错误 Bedrock Runtime:InvokeModel,https响应错误状态码:403,请求ID:3c8d1b0c-1a09-4e7e-9564-8ca3195c950e,访问被拒绝异常:anthropic.claude-fable-5 在此账户中不可用。您可以在Amazon Bedrock上探索其他可用模型。如需额外的访问选项,请联系AWS销售团队。
2. 🎯 原因分析
anthropic.claude-fable-5模型的权限,导致AWS Bedrock服务拒绝请求(HTTP 403访问被拒绝)。InvokeModel操作时,模型权限校验失败,AWS判定该模型不在当前账户的可用模型列表中。3. 💡 解决方案
anthropic.claude-fable-5。 // 示例:使用账户可用的模型(需替换成实际查询到的模型ID)
const modelId = "anthropic.claude-v2"; // 替换为账户可用的模型
const bedrockClient = new AWS.BedrockRuntime();
const response = await bedrockClient.invokeModel({
modelId,
body: JSON.stringify({
prompt: "你的请求内容",
max_tokens: 4096,
temperature: 0.7
})
}).promise();
- 申请模型访问权限:若必须使用
anthropic.claude-fable-5,通过[AWS销售支持链接](https://aws.amazon.com/contact-us/sales-support/)联系AWS销售团队,申请该模型的访问权限,等待权限开通后重试调用。
4. 🛡️ 预防措施
ListFoundationModels接口获取可用模型。