Skip to main content
Connect apps

OSS

Connect Object Storage Service through a service-linked role so that agents can access files in a bucket.

The OSS connector lets agents access files in your own OSS bucket. The data stays in OSS and is read in real time when a tool is called, with no copies created.

Prerequisites

  • You have created an OSS bucket.
  • You have activated the vector retrieval service.
  • The current account has read permissions on the target bucket.

Authorization method

The OSS connection accesses your bucket through an Alibaba Cloud service-linked role, so there is no need to configure an AccessKey.
Before first use, you need to initialize the service-linked role. Authorize now in the connection dialog guides you through this step.

Connection steps

1

Open the connection dialog

On the Apps page, find the OSS card and click Connect.
2

Enter the basic information

FieldRequiredDescription
Connector nameYesUse a name that is easy to recognize. Up to 64 characters
Connector descriptionNoDescribes what content this bucket holds
3

Complete the authorization

The first time you connect, click Authorize now and initialize the service-linked role as prompted on the page.
4

Select the storage bucket

In the Storage bucket selection drop-down list, select the target bucket. The list shows only buckets that the current account has permission to access and for which authorization has been completed.If the drop-down list is empty, first confirm whether the authorization is complete and whether the bucket tags have been added.
5

Confirm creation

Click Confirm to complete the connection.

Bucket tag requirements

Alibaba Cloud Model Studio uses bucket tags to determine whether access is allowed. The bucket must carry this tag:
PurposeTag keyTag value
Accessing bucket files as an OSS connector, or serving as the source of an OSS batch import in a File connectorbailian-datahub-accessread
If a tag is missing or its value is incorrect, the bucket does not appear in the drop-down list, or the connection fails to be created. The error message sometimes points to the CORS configuration, but the actual cause is usually a tag issue, so verify the tags before investigating other directions.
Tags are added on the bucket management page in the OSS console.

How to add the bucket tag

The OSS connector section of the Model Studio documentation, which covers the tagging steps

Automatically generated tools

After the connection succeeds, Connector generates tools for accessing files in the bucket. Expand a tool in the Available tools section of the App details page to view its actual input and output parameters.

Two ways to use OSS

OSS appears in two places in Connector, each for a different purpose:
PathData locationSuitable scenario
OSS connectorStays in OSSAn agent reads files in a bucket in real time
OSS batch import in a File connectorA copy is stored on the platformA one-time import of files that already exist in the bucket
For the latter, see the File connector.

About traffic fees

Reading data from OSS incurs outbound traffic fees on the OSS side, which OSS charges according to its own billing rules, separately from Connector usage. These fees become noticeable when the same bucket is read frequently.