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.
The OSS connection accesses your bucket through an Alibaba Cloud service-linked role, so there is no need to configure an AccessKey.
Alibaba Cloud Model Studio uses bucket tags to determine whether access is allowed. The bucket must carry this tag:
Tags are added on the bucket management page in the OSS console.
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.
OSS appears in two places in Connector, each for a different purpose:
For the latter, see the File connector.
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.
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
| 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 |
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:
| 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 |
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:
| 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 |