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
-
Open the connection dialog: On the Apps page, find the OSS card and click Connect.
-
Enter the basic information:
| Field | Required | Description |
|---|
| Connector name | Yes | Use a name that is easy to recognize. Up to 64 characters |
| Connector description | No | Describes what content this bucket holds |
-
Complete the authorization: The first time you connect, click Authorize now and initialize the service-linked role as prompted on the page.
-
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.
-
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:
| Purpose | Tag key | Tag value |
|---|
| Accessing bucket files as an OSS connector, or serving as the source of an OSS batch import in a File connector | bailian-datahub-access | read |
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. For the tagging steps, see the OSS section of the legacy data connection documentation.
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:
| Path | Data location | Suitable scenario |
|---|
| OSS connector | Stays in OSS | An agent reads files in a bucket in real time |
| OSS batch import in a File connector | A copy is stored on the platform | A 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.