本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
要在 Amazon Lex V2 控制台上访问该功能,请确保您的控制台角色具有 bedrock:ListFoundationModels
权限。
与机器人关联的 IAM 角色应具有 AMAZON.QnAIntent
所需的以下权限。机器人角色应具有调用 bedrock:InvokeModel
权限。您还应为在机器人的 AMAZON.QnAIntent
中指定的每个数据存储附加一条语句(请参阅以下策略中的 Permissions to access Amazon Kendra index
、Permissions to access OpenSearch Service index
和 Permissions to access knowledge base in Amazon Bedrock
语句)。在 Amazon Lex 控制台中启用该功能时,只要您的机器人使用的是由 Amazon Lex 生成的服务相关角色,这些策略就会自动添加到机器人角色中。
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Permissions to invoke Amazon Bedrock foundation models",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel"
],
"Resource": [
"arn:aws:bedrock:region
::foundation-model/model-id
"
]
},
{
"Sid": "Permissions to access Amazon Kendra index",
"Effect": "Allow",
"Action": [
"kendra:Query",
"kendra:Retrieve"
],
"Resource": [
"arn:aws:kendra:region
:account-id
:index/kendra-index
"
]
},
{
"Sid": "Permissions to access OpenSearch Service index",
"Effect": "Allow",
"Action": [
"es:ESHttpGet",
"es:ESHttpPost"
],
"Resource": [
"arn:aws:es:region
:account-id
:domain/domain-name
/index-name
/_search"
]
},
{
"Sid": "Permissions to access knowledge base in Amazon Bedrock",
"Effect": "Allow",
"Action": [
"bedrock:Retrieve"
],
"Resource": [
"arn:aws:bedrock:region
:account-id
:knowledge-base/knowledge-base
"
]
}
]
}