本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用客戶受管金鑰 (CMK) 加密代理程式工作階段
如果您已為代理程式啟用記憶體,且您使用客戶受管金鑰加密代理程式工作階段,則必須設定下列金鑰政策和呼叫身分 IAM 許可,以設定客戶受管金鑰。
客戶受管金鑰政策
Amazon Bedrock 使用這些許可來產生加密的資料金鑰,然後使用產生的金鑰來加密代理程式記憶體。Amazon Bedrock 還需要許可,才能以不同的加密內容重新加密產生的資料金鑰。當客戶受管金鑰在另一個客戶受管金鑰或服務擁有的金鑰之間轉換時,也會使用重新加密許可。如需詳細資訊,請參閱階層式 keyring。
用適當的值取代 $region、account-id 和 ${caller-identity-role}。
{ "Version": "2012-10-17", { "Sid": "Allow access for bedrock to enable long term memory", "Effect": "Allow", "Principal": { "Service": [ "bedrock.amazonaws.com", ], }, "Action": [ "kms:GenerateDataKeyWithoutPlainText", "kms:ReEncrypt*" ], "Condition": { "StringEquals": { "aws:SourceAccount": "$account-id" }, "ArnLike": { "aws:SourceArn": "arn:aws:bedrock:$region:$account-id:agent-alias/*" } } "Resource": "*" }, { "Sid": "Allow the caller identity control plane permissions for long term memory", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::${account-id}:role/${caller-identity-role}" }, "Action": [ "kms:GenerateDataKeyWithoutPlainText", "kms:ReEncrypt*" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws-crypto-ec:aws:bedrock:arn": "arn:aws:bedrock:${region}:${account-id}:agent-alias/*" } } }, { "Sid": "Allow the caller identity data plane permissions to decrypt long term memory", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::${account-id}:role/${caller-identity-role}" }, "Action": [ "kms:Decrypt" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws-crypto-ec:aws:bedrock:arn": "arn:aws:bedrock:${region}:${account-id}:agent-alias/*", "kms:ViaService": "bedrock.$region.amazonaws.com" } } } }
加密和解密代理程式記憶體的 IAM 許可
呼叫 Agents API 的身分需要下列 IAM 許可,才能為啟用記憶體的代理程式設定 KMS 金鑰。Amazon Bedrock 代理程式使用這些許可,以確保發起人身分獲得授權,具有上述金鑰政策中提及的許可,以便 API 管理、訓練和部署模型。對於調用代理程式的 API,Amazon Bedrock 代理程式會使用發起人身分的 kms:Decrypt 許可來解密記憶體。
用適當的值取代 $region、account-id 和 ${key-id}。