storing-and-querying-vectors

Store and query vector embeddings using Amazon S3 Vectors for semantic search and RAG workloads.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill storing-and-querying-vectors-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storing-and-querying-vectors
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/storing-and-querying-vectors
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill storing-and-querying-vectors-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up cost-effective long-term vector storage on AWS involves many immutable configuration decisions (dimensions, distance metrics, metadata keys, encryption) that are easy to get wrong. This Skill guides you through creating S3 Vectors buckets and indexes, generating embeddings, and running similarity queries without costly misconfiguration. ## Core Features & Use Cases - Vector Bucket & Index Creation: Step-by-step setup of S3 Vectors buckets and indexes with pre-flight checklists for immutable parameters like dimension, distance metric, and non-filterable metadata keys. - Embedding Generation & Storage: Generate embeddings via Amazon Bedrock (Titan, Cohere) and batch-insert vectors with PutVectors, including retry and backoff handling for rate limits. - Similarity Search with Metadata Filtering: Query vectors with top-k, distance metrics, and filter expressions, with guidance on required IAM permissions. - Use Case: You are building a RAG application and need affordable vector storage for infrequent queries. Use this Skill to create a vector index matching your embedding model, ingest your document embeddings, and run semantic search queries with metadata filters. ## Quick Start Ask the assistant to create an S3 Vectors bucket and index, then store and query embeddings for your documents using Amazon S3 Vectors.

Frequently Asked Questions about storing-and-querying-vectors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I store and query vector embeddings on AWS?

Use Amazon S3 Vectors: create a vector bucket, create an index with a dimension and distance metric matching your embedding model, insert vectors with PutVectors, and search with QueryVectors. Embeddings can be generated with Amazon Bedrock models like Titan or Cohere.

When should I use S3 Vectors vs OpenSearch for vector search?

S3 Vectors fits cost-effective long-term storage with infrequent queries and RAG workloads, delivering subsecond to 100ms latency. For hundreds or thousands of sustained QPS, hybrid search, aggregations, or faceted search, use OpenSearch instead, optionally with S3 Vectors as its storage engine.

How do I filter S3 Vectors query results by metadata?

Pass a --filter expression to query-vectors using operators like $eq, $in, $gte, $and, and $or on filterable metadata keys. Filtering requires both s3vectors:QueryVectors and s3vectors:GetVectors IAM permissions, otherwise the request returns 403 Forbidden.

Can I change the dimension or distance metric of an S3 Vectors index after creation?

No. Dimension, distance metric, non-filterable metadata keys, and encryption are immutable after index creation. To change them you must delete and recreate the index, which destroys all stored vectors, so confirm these parameters with your embedding model first.

Why does my S3 Vectors query return 403 Forbidden with a filter?

Using --filter or --return-metadata requires both s3vectors:QueryVectors and s3vectors:GetVectors IAM permissions. Without GetVectors, these options return 403. Also note S3 Vectors uses the s3vectors:* IAM namespace, not s3:*.

What are the limits of Amazon S3 Vectors for batch ingestion?

PutVectors accepts a maximum of 500 vectors per call, and you should batch vectors and implement retry with backoff on 429 TooManyRequestsException. For sustained throughput beyond per-index limits, shard data across multiple indexes.