Vectors
Source:
src/AWS/S3Vectors/Vectors.ts
Read-write runtime binding for the S3 Vectors data plane — read and write
vectors in a bound Index.
Bind an Index inside a function runtime to get a VectorsClient
with put / query / get / list / delete. The binding grants
read+write s3vectors:*Vectors actions scoped to exactly the bound index’s
ARN. This is the natural read/write pairing for a vector store — the key
enabler for building embedding search and RAG retrieval on top of S3
Vectors. For least privilege, prefer VectorsRead (query/get/list)
or VectorsWrite (put/delete) where one direction suffices.
Reading and Writing Vectors
Section titled “Reading and Writing Vectors”// initconst vectors = yield* AWS.S3Vectors.Vectors(index);
// runtime — insertyield* vectors.put({ vectors: [ { key: "doc-1", data: { float32: [0.1, 0.2, 0.3] } }, ],});
// runtime — query nearest neighborsconst result = yield* vectors.query({ topK: 5, queryVector: { float32: [0.1, 0.2, 0.3] }, returnDistance: true,});