Skip to main content
Every object in an existing Tencent Cloud Object Storage (COS) bucket becomes a file, and every / in a key becomes a folder.

Setup

Create an API key in the CAM console, then export it.
  1. Open Users > User List and create or pick a sub-user. Attach a COS policy to it: read-only for a read mount, read and write for a write mount.
  2. Click the sub-user’s name, open the API Key tab and click Create Key.
  3. Copy the SecretId (the access key ID) and SecretKey (the secret access key).
  4. Note the bucket’s region, for example ap-guangzhou, and its full name.
A COS bucket name always ends in the account’s APPID, as in my-bucket-1250000000. Use the full name, suffix included, for COS_BUCKET.

Connect

workspace.yaml

Layout

  • The endpoint comes from region: cos.<region>.myqcloud.com. endpoint_url (endpoint in TypeScript) overrides it.
  • key_prefix (keyPrefix in TypeScript) mounts one folder of the bucket as the root.
  • grep -r, find and du stop after 1000 files; a glob matching more, tar -c, cp -r and rm -r are refused.

Sample runs

On a write mount, cp, mv, rm and > change objects in the bucket. For write: conditional, see S3-compatible VFSes.

SDK guides

Python

Every config field, the VFS.md and write support.

TypeScript

Every config field, the VFS.md and write support.