S3 Vector Buckets
Keep embeddings alongside your objects, files, and analytical tables in one SeaweedFS cluster. Vector buckets expose the AWS-compatible S3 Vectors API: create an index, write vectors with metadata, and query the nearest matches using an AWS SDK or CLI pointed at your S3 endpoint.
Use vector buckets for semantic search, retrieval-augmented generation (RAG), and recommendations. Your application generates the embeddings; SeaweedFS stores and searches them. Index data lives in Lance tables on the cluster’s filers and volume servers.
What you can do
- Organize embeddings. A vector bucket contains indexes; each index fixes a dimension and distance metric, and each vector has a key, float32 values, and optional metadata.
- Search by similarity. Use cosine or Euclidean distance, add metadata filters, and return distances and metadata with the matches.
- Use familiar clients. Connect with the
s3vectorsAWS SDK client or the AWS CLI’ss3vectorscommands on the same endpoint as your S3 object requests. - Control access. Use
s3vectors:*IAM actions, vector bucket policies, and tags on buckets and indexes. - Manage from the Admin UI. The Vector Buckets pages provide bucket and index management and vector query tools.
Vector buckets and the single weed-vector engine are part of open-source SeaweedFS. Enterprise adds Distributed Vector Search, which spreads queries across several weed-vector engines while keeping the same API and stored data.
Try it locally
Install matching releases of weed and the separate weed-vector binary. The deployment guide links to releases; the vector engine README also covers building from source. Use an AWS CLI version with aws s3vectors support.
This local example binds to loopback and uses demo credentials:
cat > s3config.json <<'JSON'
{
"identities": [{
"name": "vector-demo",
"credentials": [{"accessKey": "vector-demo", "secretKey": "vector-demo-secret"}],
"actions": ["Admin"]
}]
}
JSON
weed mini -dir=./vector-data -ip=127.0.0.1 -ip.bind=127.0.0.1 \
-s3.config=./s3config.json -vector
Place weed-vector beside weed or on PATH. Mini starts the engine, waits for its master registration, and stops it when the cluster stops. -vector.binary selects an explicit binary path.
In another terminal, create a bucket and a three-dimensional cosine index:
export AWS_ACCESS_KEY_ID=vector-demo
export AWS_SECRET_ACCESS_KEY=vector-demo-secret
export AWS_DEFAULT_REGION=us-east-1
export VECTOR_ENDPOINT=http://127.0.0.1:8333
aws --endpoint-url "$VECTOR_ENDPOINT" s3vectors create-vector-bucket \
--vector-bucket-name embeddings
aws --endpoint-url "$VECTOR_ENDPOINT" s3vectors create-index \
--vector-bucket-name embeddings --index-name documents \
--data-type float32 --dimension 3 --distance-metric cosine
Write embeddings with metadata:
aws --endpoint-url "$VECTOR_ENDPOINT" s3vectors put-vectors \
--vector-bucket-name embeddings --index-name documents \
--vectors '[
{"key":"storage-guide","data":{"float32":[1,0,0]},"metadata":{"category":"docs"}},
{"key":"deployment-guide","data":{"float32":[0.8,0.2,0]},"metadata":{"category":"docs"}},
{"key":"product-image","data":{"float32":[0,1,0]},"metadata":{"category":"images"}}
]'
Query the closest documentation vectors, including distances and metadata:
aws --endpoint-url "$VECTOR_ENDPOINT" s3vectors query-vectors \
--vector-bucket-name embeddings --index-name documents \
--query-vector '{"float32":[1,0,0]}' --top-k 2 \
--filter '{"category":{"$eq":"docs"}}' \
--return-distance --return-metadata
The filter restricts matches to category=docs. Use your embedding model’s dimension in a real index and use the same model for stored and query vectors.
Run in production
Run weed-vector --masters=<master-addresses> as a separate service and advertise a gRPC address reachable from the S3 gateway. The engine registers with the masters; gateways discover it automatically. Configure the engine with the same cluster TLS, signing, and encryption settings used by the other storage clients.
Maintenance worker and indexes
The Lance maintenance worker, weed-worker, builds two kinds of index in the background. ANN vector indexes speed up similarity search. Metadata indexes speed up filters on a metadata key. Queries return the same results without either one; they scan instead.
weed-worker --admin <admin-host>:12535 --masters <master-addresses> \
--namespace http://<s3-host>:9101
- Share the cluster’s
jwt.filer_signing.key. The worker has no S3 credentials. The Lance catalog trusts it through a token derived from this key. The worker reads the key fromsecurity.toml(the same locationsweedsearches),WEED_JWT_FILER_SIGNING_KEY, or--filer-signing-key. With S3 authentication on, a worker without the key still connects, but its jobs fail with403 Forbidden. - Turn on the schedules. In the Admin UI, open Maintenance jobs and enable Lance Vector Index and Lance Metadata Index; both are off by default. Lance Vector Index builds and refreshes the ANN index once an index holds 50,000 rows. Lance Metadata Index folds rows written after an index was built into it once 50,000 have built up. Both thresholds can be changed in the job’s configuration.
- Index a metadata key from the index’s panel on the Vector Buckets page. Frequently filtered, not indexed suggests keys your queries filter on. Clicking Index builds that key’s index right away, without waiting for a schedule. The key shows Ready about three minutes later, after writes already in progress have finished. This speeds up string
$eqand$infilters, with up to eight keys per index. Rows the index doesn’t cover yet are still checked and returned.
The beginner guide walks through this on a local cluster. For flags, supported operations, IAM permissions, and metrics, see the Vector Buckets reference.
Vector buckets, Lance tables, and distributed search
| Choose | When you need |
|---|---|
| S3 Vector Buckets | An embedding API: bucket/index management, vector writes, metadata filtering, and similarity queries from AWS SDKs or CLI. |
| Lance table buckets | Direct LanceDB access through the Lance Namespace catalog. S3 vector buckets reuse Lance table-bucket storage and keep API-managed indexes in the reserved vector namespace. |
| Distributed Vector Search | Enterprise query execution across your weed-vector engines for your S3 vector indexes. |
See the edition comparison, LanceDB walkthrough, and AWS S3 Vectors API guide.