Assigning Basic Permissions for Using New-Version Inference to an IAM User
Scenario
This section describes the basic permissions required by sub-accounts in the inference deployment scenario. This example involves granting sub-accounts the permissions to deploy inference services using the real-time service (new version) function on the ModelArts console.
Procedure
In this example, the image is uploaded to SWR, and the inference service is deployed on the real-time service (new version) page of the ModelArts console.
- Log in to the console as a tenant user, hover the cursor over your username in the upper right corner, and choose Identity and Access Management from the drop-down list to switch to the IAM console.
- Add permissions for deploying services. On the IAM console, choose Permissions > Policies/Roles from the navigation pane on the left, click Create Custom Policy in the upper right corner, and configure the policies. Add permissions for deploying services.
- Policy Name: Enter a policy name, for example, service.
- Policy View: Select JSON.
- Policy Content: Enter the following information.
{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ "lts:groups:create", "lts:groups:get", "lts:groups:list", "lts:topics:create", "lts:topics:delete", "lts:topics:get", "lts:topics:list", "obs:bucket:GetBucketLocation", "obs:bucket:HeadBucket", "obs:bucket:ListAllMybuckets", "obs:bucket:ListBucket", "obs:bucket:PutBucketAcl", "obs:object:AbortMultipartUpload", "obs:object:DeleteObject", "obs:object:DeleteObjectVersion", "obs:object:GetObject", "obs:object:GetObjectAcl", "obs:object:GetObjectVersion", "obs:object:GetObjectVersionAcl", "obs:object:ListMultipartUploadParts", "obs:object:PutObject", "obs:object:PutObjectAcl", "swr:instance:list", "swr:repo:listRepoTags", "swr:repository:getTag", "swr:repository:listArtifacts", "swr:repository:listRepositories", "csms:secret:list", "csms:secretVersion:get", "sfsturbo:shares:getAllShares", "sfsturbo:shares:getShare", "sfsturbo:shares:showFsDir", "modelarts:authorization:list", "modelarts:clusterFlavor:list", "modelarts:image:get", "modelarts:image:list", "modelarts:image:listGroup", "modelarts:network:list", "modelarts:pool:get", "modelarts:pool:list", "modelarts:pool:update", "modelarts:service:create", "modelarts:service:get", "modelarts:service:list", "modelarts:tag:listTags", "modelarts:warmupTask:list", "modelarts:workspace:checkAuthorizations", "modelarts:workspace:get", "modelarts:workspace:getAuthMode", "modelarts:workspace:list", "vpc:vpcs:list", "vpc:subnets:get", "kms:dek:decrypt" ] } ] } - Create a user group and add the target user to it. For details, see Step 1 Creating a User Group and Adding Users to the User Group.
- Grant the required policy to the user group.
On the user group list page of IAM, click Authorize of the target user group. The Authorize User Group page is displayed. Select service and SWR Admin. Click Next and then OK.
- Create a ModelArts agency.
- Create an agency authorization policy.
On the IAM console, choose Permissions > Policies/Roles from the navigation pane on the left, click Create Custom Policy in the upper right corner, and configure the policies.
- Policy Name: Enter a policy name, for example, service_agency.
- Policy View: Select JSON.
- Policy Content: Enter the following information:
{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ "lts:groups:create", "lts:groups:get", "lts:groups:list", "lts:topics:create", "lts:topics:delete", "lts:topics:get", "lts:topics:list", "sfsturbo:shares:getShare", "sfsturbo:shares:showFsDir", "swr:repo:listRepoTags", "swr:repository:getTag", "obs:object:DeleteObject", "obs:object:GetObject", "obs:bucket:CreateBucket", "obs:bucket:ListBucket", "obs:object:PutObject", "obs:bucket:GetBucketAcl", "obs:bucket:PutBucketAcl", "obs:bucket:PutBucketCORS", "kms:dek:decrypt" "csms:secretVersion:get", "modelarts:authorization:list", "modelarts:image:get", "modelarts:pool:get", "modelarts:pool:list", "modelarts:pool:update", "modelarts:warmupTask:list" ] } ] }
- Create an agency.
On the IAM console, choose Agencies from the navigation pane, click Create Agency in the upper right corner, and configure policies. Enter agency information and click Next.
- Agency Name: Enter an agency name, for example, ma_agency_service.
- Agency Type: Select Cloud service.
- Cloud Service: Select ModelArts.
- Validity Period: Select Unlimited.
Select the new agency policy and click Next. Set the minimum authorization scope. Select All resources for Scope. Click OK.
- Assign ModelArts permissions for IAM users.
Log in to the ModelArts console. In the navigation pane on the left, choose Permission Management. On the displayed page, click Add Authorization. Set Authorized User to IAM user and select the created agency. Then, click Create.
- Create an agency authorization policy.
- Verify that the permission is assigned.
Log in to the ModelArts console as the IAM user. If the user can upload images to SWR and deploy them, the permission configuration is successful.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot