Amazon Bedrock Marketplace 설정 - Amazon Bedrock

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Amazon Bedrock Marketplace 설정

Amazon Bedrock 전체 액세스 정책을 사용하여 SageMaker AI에 권한을 제공할 수 있습니다. 관리형 정책을 사용하는 것이 좋지만, 관리형 정책을 사용할 수 없는 경우 IAM 역할에 다음 권한이 있는지 확인합니다.

다음은 Amazon Bedrock 전체 액세스 정책에서 제공하는 권한입니다.

JSON
{ "Version":"2012-10-17", "Statement": [ { "Sid": "BedrockAll", "Effect": "Allow", "Action": [ "bedrock:*" ], "Resource": "*" }, { "Sid": "DescribeKey", "Effect": "Allow", "Action": [ "kms:DescribeKey" ], "Resource": "arn:*:kms:*:::*" }, { "Sid": "APIsWithAllResourceAccess", "Effect": "Allow", "Action": [ "iam:ListRoles", "ec2:DescribeVpcs", "ec2:DescribeSubnets", "ec2:DescribeSecurityGroups" ], "Resource": "*" }, { "Sid": "MarketplaceModelEndpointMutatingAPIs", "Effect": "Allow", "Action": [ "sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig", "sagemaker:CreateModel", "sagemaker:CreateInferenceComponent", "sagemaker:DeleteInferenceComponent", "sagemaker:DeleteEndpoint", "sagemaker:UpdateEndpoint" ], "Resource": [ "arn:aws:sagemaker:*:*:endpoint/*", "arn:aws:sagemaker:*:*:endpoint-config/*", "arn:aws:sagemaker:*:*:model/*" ], "Condition": { "StringEquals": { "aws:CalledViaLast": "bedrock.amazonaws.com" } } }, { "Sid": "BedrockEndpointTaggingOperations", "Effect": "Allow", "Action": [ "sagemaker:AddTags", "sagemaker:DeleteTags" ], "Resource": [ "arn:aws:sagemaker:*:*:endpoint/*", "arn:aws:sagemaker:*:*:endpoint-config/*", "arn:aws:sagemaker:*:*:model/*" ] }, { "Sid": "MarketplaceModelEndpointNonMutatingAPIs", "Effect": "Allow", "Action": [ "sagemaker:DescribeEndpoint", "sagemaker:DescribeEndpointConfig", "sagemaker:DescribeModel", "sagemaker:DescribeInferenceComponent", "sagemaker:ListEndpoints", "sagemaker:ListTags" ], "Resource": [ "arn:aws:sagemaker:*:*:endpoint/*", "arn:aws:sagemaker:*:*:endpoint-config/*", "arn:aws:sagemaker:*:*:model/*" ], "Condition": { "StringEquals": { "aws:CalledViaLast": "bedrock.amazonaws.com" } } }, { "Sid": "BedrockEndpointInvokingOperations", "Effect": "Allow", "Action": [ "sagemaker:InvokeEndpoint", "sagemaker:InvokeEndpointWithResponseStream" ], "Resource": [ "arn:aws:sagemaker:*:*:endpoint/*" ], "Condition": { "StringEquals": { "aws:CalledViaLast": "bedrock.amazonaws.com" } } }, { "Sid": "DiscoveringMarketplaceModel", "Effect": "Allow", "Action": [ "sagemaker:DescribeHubContent" ], "Resource": [ "arn:aws:sagemaker:*:aws:hub-content/SageMakerPublicHub/Model/*", "arn:aws:sagemaker:*:aws:hub/SageMakerPublicHub" ] }, { "Sid": "AllowMarketplaceModelsListing", "Effect": "Allow", "Action": [ "sagemaker:ListHubContents" ], "Resource": "arn:aws:sagemaker:*:aws:hub/SageMakerPublicHub" }, { "Sid": "RetrieveSubscribedMarketplaceLicenses", "Effect": "Allow", "Action": [ "license-manager:ListReceivedLicenses" ], "Resource": [ "*" ] }, { "Sid": "PassRoleToSageMaker", "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": [ "arn:aws:iam::*:role/*Sagemaker*ForBedrock*" ], "Condition": { "StringEquals": { "iam:PassedToService": [ "sagemaker.amazonaws.com", "bedrock.amazonaws.com" ] } } }, { "Sid": "PassRoleToBedrock", "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::*:role/*AmazonBedrock*", "Condition": { "StringEquals": { "iam:PassedToService": [ "bedrock.amazonaws.com" ] } } } ] }
중요

Amazon Bedrock 전체 액세스 정책은 Amazon Bedrock API에 대한 권한만 제공합니다. 에서 Amazon Bedrock을 사용하려면 AWS Management ConsoleIAM 역할에 다음 권한도 있어야 합니다.

{ "Sid": "AllowConsoleS3AccessForBedrockMarketplace", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetBucketCORS", "s3:ListBucket", "s3:ListBucketVersions", "s3:GetBucketLocation" ], "Resource": "*" }

자체 정책을 작성하는 경우 리소스에 대한 Amazon Bedrock Marketplace 작업을 허용하는 정책 문을 포함해야 합니다. 예를 들어, 다음 정책을 사용하면 Amazon Bedrock이 엔드포인트에 배포한 모델에 InvokeModel 작업을 사용할 수 있습니다.

JSON
{ "Version":"2012-10-17", "Statement": [ { "Sid": "BedrockAll", "Effect": "Allow", "Action": [ "bedrock:InvokeModel" ], "Resource": [ "arn:aws:bedrock:us-east-1:111122223333:marketplace/model-endpoint/all-access" ] }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": ["sagemaker:InvokeEndpoint"], "Resource": "arn:aws:sagemaker:us-east-1:111122223333:endpoint/*", "Condition": { "StringEquals": { "aws:ResourceTag/project": "example-project-id", "aws:CalledViaLast": "bedrock.amazonaws.com" } } } ] }

Amazon Bedrock 설정에 대한 자세한 내용은 빠른 시작 섹션을 참조하세요.

키를 사용하여 모델을 배포한 엔드포인트를 AWS Key Management Service암호화할 수 있습니다. 이전 정책을 수정하여 AWS KMS 키 사용 권한을 얻어야 합니다.

AWS KMS키에는 엔드포인트를 암호화할 수 있는 권한도 있어야 합니다. 엔드포인트를 암호화하려면 AWS KMS 리소스 정책을 수정해야 합니다. 정책 수정에 대한 자세한 내용은에서 IAM 정책 사용을 참조하세요AWS Key Management Service.

AWS KMS키에도 CreateGrant 권한이 있어야 합니다. 다음은 키 정책에 있어야 하는 권한의 예입니다.

{ "Sid": "Allow access for AmazonSageMaker-ExecutionRole", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/SagemakerExecutionRole" }, "Action": "kms:CreateGrant", "Resource": "*" }

권한 부여 생성 제공에 대한 자세한 내용은 CreateGrant 권한 부여를 참조하세요.