本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
為 Amazon 基岩工作室創建服務角色
Amazon 基岩工作室正在針對 Amazon 基岩的預覽版本,可能會有所變更。 |
若要管理 Amazon 基岩工作室工作區,您需要建立可讓 Amazon DataZone 管理工作區的服務角色。
若要為 Amazon Bdrock Studio 使用服務角色,請按照建立IAM角色以委派許可給服務中的步驟,建立角色並附加以下許可。 AWS
信任關係
以下政策允許 Amazon 基岩擔任此角色,並與 Amazon 管理 Amazon 基岩工作室工作區。 DataZone以下顯示您可使用的範例政策。
-
將該
aws:SourceAccount
值設置為您的 AWS 帳戶 ID。
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "datazone.amazonaws.com" }, "Action": [ "sts:AssumeRole", "sts:TagSession" ], "Condition": { "StringEquals": { "aws:SourceAccount": "
account ID
" }, "ForAllValues:StringLike": { "aws:TagKeys": "datazone*" } } } ] }
管理 Amazon 基岩工作室工作區的許可
主要 Amazon 基岩工作室服務角色的預設政策。Amazon 基岩使用此角色在 Amazon 的基岩工作室中建立、運行和共享資源。 DataZone
此原則包含下列權限集。
資料酮 — 授予對 Amazon 基岩工作室管理的 Amazon DataZone 資源的存取權。
ram — 允許擷取您擁有的資源共用關聯。
基岩 — 授予叫用 Amazon 基岩基礎模型的能力。
kms — 授予使用 AWS KMS 客戶管理金鑰加密 Amazon 基岩工作室資料的存取權。
{ "Version": "2012-10-17", "Statement": [ { "Sid": "GetDataZoneDomain", "Effect": "Allow", "Action": "datazone:GetDomain", "Resource": "*", "Condition": { "StringEquals": { "aws:ResourceTag/AmazonBedrockManaged": "true" } } }, { "Sid": "ManageDataZoneResources", "Effect": "Allow", "Action": [ "datazone:ListProjects", "datazone:GetProject", "datazone:CreateProject", "datazone:UpdateProject", "datazone:DeleteProject", "datazone:ListProjectMemberships", "datazone:CreateProjectMembership", "datazone:DeleteProjectMembership", "datazone:ListEnvironments", "datazone:GetEnvironment", "datazone:CreateEnvironment", "datazone:UpdateEnvironment", "datazone:DeleteEnvironment", "datazone:ListEnvironmentBlueprints", "datazone:GetEnvironmentBlueprint", "datazone:ListEnvironmentBlueprintConfigurations", "datazone:GetEnvironmentBlueprintConfiguration", "datazone:ListEnvironmentProfiles", "datazone:GetEnvironmentProfile", "datazone:CreateEnvironmentProfile", "datazone:UpdateEnvironmentProfile", "datazone:DeleteEnvironmentProfile", "datazone:GetEnvironmentCredentials", "datazone:ListGroupsForUser", "datazone:SearchUserProfiles", "datazone:SearchGroupProfiles", "datazone:GetUserProfile", "datazone:GetGroupProfile" ], "Resource": "*" }, { "Sid": "GetResourceShareAssociations", "Effect": "Allow", "Action": "ram:GetResourceShareAssociations", "Resource": "*" }, { "Sid": "InvokeBedrockModels", "Effect": "Allow", "Action": [ "bedrock:GetFoundationModelAvailability", "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": "*" }, { "Sid": "UseCustomerManagedKmsKey", "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "*", "Condition": { "StringEquals": { "aws:ResourceTag/EnableBedrock": "true" } } } ] }