設定客戶受管金鑰政策
注意
目前我們不支援透過主控台在字符保存庫上設定 CMK。
若要使用客戶受管金鑰,您的金鑰必須信任 Amazon Bedrock AgentCore Identity 服務主體,才能對金鑰執行加密和解密操作。設定 KMS 金鑰的金鑰政策,如下列範例所示。撰寫此政策的 IAM 主體必須具有 KMS 金鑰的寫入存取權,並具有 kms:PutKeyPolicy 許可。
{ "Id": "identity-service-cmk-policy", "Version": "2012-10-17", "Statement": [ { "Sid": "BedrockAgentCoreIdentityKMSAccess", "Effect": "Allow", "Action": [ "kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKeyWithoutPlaintext" ], "Resource": "*", "Condition": { "StringLike": { "kms:ViaService": "bedrock-agentcore-identity.*.amazonaws.com" }, "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" }, "ArnLike": { "kms:EncryptionContext:aws-crypto-ec:aws:bedrock-agentcore-identity:token-vault-arn": "arn:aws:bedrock-agentcore:*:*:token-vault/default" } } }, { "Sid": "BedrockAgentCoreIdentityDescribeKeyKMSAccess", "Effect": "Allow", "Action": [ "kms:DescribeKey" ], "Resource": "*", "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" }, "StringLike": { "kms:ViaService": "bedrock-agentcore-identity.*.amazonaws.com" } } } ] }