You can import data from Object Storage Service (OSS) to Data Management of Alibaba Cloud Model Studio. This topic describes how to authorize OSS access and how to import data from OSS.
You are billed for using OSS. For more information, see Get started by using the OSS console and Billing overview.
Procedure
For this step, you must use the Alibaba Cloud account or an authorized RAM user. The authorization is granted using a service-linked role. For more information about how to manage or revoke a service-linked role, see Service-linked roles for Alibaba Cloud Model Studio.
Use the Alibaba Cloud account
Log on to the Alibaba Cloud Model Studio console. In the left-side navigation pane, choose .
Click Import Data.
On the Import Data page, select OSS as the Import Method.
If you have not authorized Model Studio to access OSS, click Authorize Now.
Click Confirm Authorization.
Use a RAM user
If you use a RAM user, configure a RAM role to allow the RAM user to access OSS.
Log on to the RAM Console.
In the left-side navigation pane, choose
.Click Create Policy.
Grant the permission in one of the following modes:
Visual editor:
Select Resource Management for Service.
Select ram:CreateServiceLinkedRole for Action.
Click OK.
JSON:
Use the following sample to create a policy:
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": "ram:CreateServiceLinkedRole", "Resource": "*", "Condition": { "StringEquals": { "ram:ServiceName": "datahub.sfm.aliyuncs.com" } } } ] }
Click OK.
Set the policy name and description, and click OK to confirm.
Grant the custom policy to the RAM user. For more information about how to grant the policy, see Grant permissions to a RAM user.
Add the required tag to an OSS bucket
Log on to the .
In the left-side navigation pane, choose Buckets.
Click icon in the Tag column of the desired bucket. Then, click Edit.
Click Create Tag. Enter
bailian-datahub-access
for the tag and enterread
for the tag value.Click Save.
NoteAlibaba Cloud Model Studio cannot access files in the OSS root directory. Please use an existing subdirectory or create a new one for Model Studio access.
Import data from OSS
Go back to the Alibaba Cloud Model Studio console.
In the left-side navigation pane, choose
.Click Import Data.
On the Import Data page, select OSS as the Import Method.
Select a bucket from OSS.
Import Folder: Select folders to import. All files within the selected folders are imported, but files in the subfolders are not imported.
Import File: Select files within the current folder.
Click Confirm. The import may take some time.