本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
Lex V2 for Bedrock 代理程式意圖中所需的許可
-
若要在 Amazon Lex V2 主控台上存取此功能,請確定您的主控台角色具有
bedrock:ListFoundationModels
許可。 -
與機器人相關聯的 IAM 角色應具有 所需的許可
AMAZON.BedrockAgentIntent
。bedrock:InvokeAgent
如果使用 Amazon Bedrock 代理程式,bedrock:InvokeModel
以及bedrock:RetrieveAndGenerate
如果在意圖中使用 Amazon Bedrock 知識庫,機器人角色應具有呼叫 的許可。您也應該為機器人中指定的每個代理程式附加陳述式AMAZON.BedrockAgentIntent
(請參閱以下政策中存取 Amazon Bedrock 代理程式的許可或存取 Amazon Bedrock 知識庫的許可)。當您使用 Amazon Lex 主控台啟用此功能時,如果您的機器人使用 Amazon Lex 產生的服務連結角色,政策將自動新增至機器人角色。
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Permissions to access Amazon Bedrock Agent", "Effect": "Allow", "Action": [ "bedrock:InvokeAgent" ], "Resource": [ "arn:aws:bedrock:region:accountId:agent-alias/agentId/aliasId" ], "Condition": { "StringEquals": { "aws:ResourceAccount": "accountId" } } }, { "Sid": "Permissions to access Knowledge Base in Amazon Bedrock", "Effect": "Allow", "Action": [ "bedrock:RetrieveAndGenerate" ], "Resource": [ "arn:aws:bedrock:region:accountId:knowledge-base/knowledgeBaseId" ], "Condition": { "StringEquals": { "aws:ResourceAccount": "accountId" } } }, { "Sid": "Permissions to invoke Amazon Bedrock foundation models", "Effect": "Allow", "Action": [ "bedrock:InvokeModel" ], "Resource": [ "arn:aws:bedrock:region::foundation-model/modelId" ], "Condition": { "StringEquals": { "aws:ResourceAccount": "accountId" } } } ] }