Official agent skill

Storing And Querying Vectors

by aws in aws/agent-toolkit-for-aws

Store and query vector embeddings using Amazon S3 Vectors, a cost-effective long-term vector storage service with its own API namespace (s3vectors).

OfficialApache-2.0Auto-check passedAI & LLM Engineering

Install Storing And Querying Vectors

skills CLI
$ npx skills add aws/agent-toolkit-for-aws --skill storing-and-querying-vectors -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aws/agent-toolkit-for-aws storing-and-querying-vectors --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/aws-data-analytics/skills/storing-and-querying-vectors .claude/skills/storing-and-querying-vectors && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
storing-and-querying-vectors
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
756 words
Files
3 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
Apache-2.0

At a glance

Store and query vector embeddings using Amazon S3 Vectors, a cost-effective long-term vector storage service with its own API namespace (s3vectors).

  • Works in 6 steps: Verify Dependencies → Create a Vector Bucket → Create a Vector Index → …
  • : create S3 vector bucket
  • SKILL.md covers Overview, Decision Guide, Common Tasks and Troubleshooting, plus 1 more section
  • Calls aws

What it does

Storing And Querying Vectors is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Store and query vector embeddings using Amazon S3 Vectors, a cost-effective long-term vector storage service with its own API namespace (s3vectors). Triggers on: create S3 vector bucket, vector index, store embeddings, semantic search, RAG vector storage, similarity search, vector database, migrate from other vector databases. Do NOT use for: querying tabular data (use querying-data-lake), S3 object storage, or hundreds/thousands of sustained QPS (use OpenSearch).

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/limits-and-patterns.md` and `references/metadata-filtering.md`).

It sits in AI & LLM Engineering, covering Vector databases, File uploads and storage and Embeddings. It works with Amazon S3, Amazon Web Services and OpenSearch. The repository describes itself as: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on AWS. The licence is Apache-2.0.

When your agent uses it

  • : create S3 vector bucket
  • Store embeddings
  • Semantic search
  • RAG vector storage

Example prompts

  • “/storing-and-querying-vectors”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Verify Dependencies
  2. Create a Vector Bucket
  3. Create a Vector Index
  4. Generate Embeddings (if needed)
  5. Put Vectors
  6. Query Vectors

What it can do on your machine

Read from SKILL.md and the folder at commit 2cb0fa1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • aws

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use aws, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Storing And Querying Vectors loads about 1.9k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 124 tokens; SKILL.md has 756 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~124
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aws/agent-toolkit-for-aws at commit 2cb0fa1, republished under its Apache-2.0 licence (© aws). 756 words, ~1,907 tokens.

Download SKILL.mdSave it as .claude/skills/storing-and-querying-vectors/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
storing-and-querying-vectors
description
Store and query vector embeddings using Amazon S3 Vectors, a cost-effective long-term vector storage service with its own API namespace (s3vectors). Triggers on: create S3 vector bucket, vector index, store embeddings, semantic search, RAG vector storage, similarity search, vector database, migrate from other vector databases. Do NOT use for: querying tabular data (use querying-data-lake), S3 object storage, or hundreds/thousands of sustained QPS (use OpenSearch).
metadata.version
1

Store and Query Vectors with Amazon S3 Vectors

Overview

Amazon S3 Vectors is a cost-effective AWS service for storing and querying vector embeddings at scale. Optimized for long-term storage with subsecond latency for cold queries, as low as 100ms for warm queries.

Decision Guide

  • Hundreds/thousands of sustained queries per second (QPS): Wrong tool. Recommend OpenSearch.
  • Hybrid search, aggregations, faceted search: Recommend OpenSearch with S3 Vectors as storage engine. For OpenSearch integration, search AWS docs for "Using S3 Vectors with OpenSearch Service".
  • Tiered (bulk + hot): S3 Vectors for storage + OpenSearch Serverless for real-time. See references/limits-and-patterns.md.
  • Cost-effective storage, infrequent queries, RAG: S3 Vectors is the right fit. Proceed.

For latest guidance, search AWS docs for "S3 Vectors best practices".

Common Tasks

Classify the request before starting:

  • Simple query: Existing index, skip to Step 6
  • Standard: You MUST list existing indexes first and suggest reusing if relevant. Else, new index + store vectors, follow Steps 2-6
  • Migration or multi-tenant: Read references/limits-and-patterns.md first, then Steps 2-6

You MUST execute commands using AWS MCP server tools when connected. Fall back to AWS CLI only if AWS MCP is unavailable. You MUST explain each step to the user before executing.

1. Verify Dependencies

Constraints:

  • You MUST check whether AWS MCP tools or AWS CLI is available and inform user if missing
  • You MUST confirm target AWS region
2. Create a Vector Bucket

You MUST confirm bucket name with user. Names: 3-63 chars, lowercase letters, numbers, hyphens only. Encryption (SSE-S3 default or SSE-KMS for compliance) is immutable after creation.

bash
aws s3vectors create-vector-bucket \
  --vector-bucket-name <BUCKET_NAME>

Constraints:

  • You MUST explain encryption cannot be changed after creation
  • For SSE-KMS, KMS key policy MUST grant kms:GenerateDataKey and kms:Decrypt to the S3 Vectors service principal indexing.s3vectors.amazonaws.com. You MUST use full KMS key ARN (not alias). See references/limits-and-patterns.md for command example.
3. Create a Vector Index

Every parameter is immutable after creation.

Pre-flight checklist (confirm ALL with user):

  1. Dimension (required, integer 1-4096) -- MUST match embedding model output
  2. Distance metric (required) -- cosine or euclidean. Use embedding model's recommended metric;
  3. Non-filterable metadata keys (optional, max 10, 1-63 chars) -- Declare at creation or lose forever. For Bedrock Knowledge Bases integration, search AWS docs for "S3 Vectors Bedrock Knowledge Bases prerequisites" to get the required key names.
  4. Encryption (optional) -- Inherits from bucket. Override per-index if needed.
bash
aws s3vectors create-index \
  --vector-bucket-name <BUCKET_NAME> \
  --index-name <INDEX_NAME> \
  --dimension <DIM> \
  --distance-metric <cosine|euclidean> \
  --data-type float32 \
  --metadata-configuration '{"nonFilterableMetadataKeys":["<KEY1>","<KEY2>"]}'

Omit --metadata-configuration if no non-filterable keys are needed.

Index names: 3-63 chars, lowercase, numbers, hyphens, dots. Unique within bucket. Filterable metadata: 2 KB limit. Total metadata (filterable + non-filterable combined): 40 KB. See references/metadata-filtering.md.

Show full SKILL.md (346 more words)Show less
4. Generate Embeddings (if needed)

Skip to Step 5 (store) or Step 6 (query) if user already has embeddings.

Constraints:

  • You MUST ask which embedding model to use if not specified
  • You MUST NOT assume a default model
  • Dimension MUST match Step 3
  • You MUST use the same model for both storing and querying

Generate embeddings with Bedrock invoke-model:

bash
aws bedrock-runtime invoke-model \
  --model-id <MODEL_ID> \
  --content-type application/json \
  --cli-binary-format raw-in-base64-out \
  --body '{"inputText": "your text"}' \
  invoke-model-output.json

You MUST use --cli-binary-format raw-in-base64-out for CLI v2. Output file is required for CLI. The response key is model-dependent (e.g., embedding for Titan, embeddings for Cohere). For Titan, parse with json.load(open('invoke-model-output.json'))['embedding']. Use embedding array as float32 in put-vectors or query-vectors. For batch embedding generation, use AWS SDK or CLI.

5. Put Vectors
bash
aws s3vectors put-vectors \
  --vector-bucket-name <BUCKET_NAME> \
  --index-name <INDEX_NAME> \
  --vectors '[{"key":"<ID>","data":{"float32":[<EMBEDDING>]},"metadata":{"topic":"science"}}]'

Constraints:

  • You MUST NOT exceed 500 vectors per call
  • You SHOULD batch vectors for cost optimization
  • For bulk operations, You SHOULD use an SDK instead of CLI -- vector payloads may be too large for shell arguments
  • You MUST implement retry with backoff on 429 TooManyRequestsException
  • See references/limits-and-patterns.md for batch patterns
6. Query Vectors

Generate embedding if needed (Step 4), then query:

bash
aws s3vectors query-vectors \
  --vector-bucket-name <BUCKET_NAME> \
  --index-name <INDEX_NAME> \
  --query-vector '{"float32":[<EMBEDDING>]}' \
  --top-k 10 \
  --return-distance

Optional: add --return-metadata and/or --filter '{"topic":{"$eq":"science"}}' (both require GetVectors permission). See references/metadata-filtering.md.

Example response body: {"vectors": [{"key": "id1", "distance": 0.45, "metadata": {"topic": "science"}}, ...], "distanceMetric": "cosine"}

Constraints:

  • Using --filter or --return-metadata requires both s3vectors:QueryVectors AND s3vectors:GetVectors IAM permissions. Without GetVectors, these options return 403.

Troubleshooting

ErrorCauseFix
DimensionMismatchDims don't match indexUse matching model, or delete/recreate index (confirm with user -- destroys all vectors).
403 Forbidden with --filter or --return-metadataMissing s3vectors:GetVectorsAdd s3vectors:GetVectors to IAM policy.
Fewer results than --top-kFew vectors match filterExpected -- filtering is inline. Broaden filter.
429 TooManyRequestsExceptionExceeded per-index rate limitsRetry with backoff. Shard across indexes for sustained throughput. Search AWS docs for "S3 Vectors limitations and restrictions" for current limits.
AccessDeniedExceptionMissing s3vectors:* IAM actionsS3 Vectors uses s3vectors:* namespace, not s3:*. Update IAM policy.
RequestTimeoutException or service unavailableRequest timeout or region not supportedRetry request. For regional availability, search AWS docs for "S3 Vectors limitations and restrictions".

Additional Resources

© aws, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in plugins/aws-data-analytics/skills/storing-and-querying-vectors of aws/agent-toolkit-for-aws.

  • SKILL.md
  • references/limits-and-patterns.md
  • references/metadata-filtering.md

Open the folder on GitHubat commit 2cb0fa1

Compare with similar skills

Storing And Querying Vectors next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Storing And Querying Vectors compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Storing And Querying Vectors this skillaws/agent-toolkit-for-aws2.8k—~1.9kAutomated safety check: PassApache-2.0
AWS S3sickn33/agentic-awesome-skills47k2 repos~3.1kAutomated safety check: PassMIT
Debugging Signals PipelinePostHog/posthog40k—~2.4kAutomated safety check: NotesCustom licence
Convex RuntimeIgorWarzocha/Opencode-Workflows122—~1.1kAutomated safety check: PassNone
Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs13k7 repos~2.3kAutomated safety check: PassMIT
Codebase Managementgiancarloerra/SocratiCode3.3k1 repos~1.8kAutomated safety check: PassAGPL-3.0

Similar skills

  • AWS S3

    sickn33/agentic-awesome-skills

    Configure S3 buckets, policies, and lifecycle rules. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.1k tokens
    Backend & APIsAuto-check passed
  • Official

    Debug the signals pipeline locally end-to-end. An agent skill from PostHog/posthog.

    40k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Convex Runtime

    IgorWarzocha/Opencode-Workflows

    Implement Convex runtime features: HTTP actions, file storage, search (full text + vector), scheduling (crons + scheduled functions), and RAG patterns.

    122 GitHub stars~1.1k tokensUpdated 8 mo ago
    Backend & APIsAuto-check passed
  • Chroma Vector Database

    Orchestra-Research/AI-Research-SKILLs

    Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.

    13k GitHub starsUsed in 7 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Codebase Management

    giancarloerra/SocratiCode

    Set up, index, and manage SocratiCode codebase indexing. An agent skill from giancarloerra/SocratiCode.

    3.3k GitHub starsUsed in 1 repo~1.8k tokens
    AI & LLM EngineeringAuto-check passed
  • Pgvector Semantic Search

    timescale/pg-aiguide

    A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.

    1.9k GitHub stars~3.8k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed

More from aws/agent-toolkit-for-aws

All 138 skills in this repo
  • Agent Advisor

    aws/agent-toolkit-for-aws

    Official

    Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow.

    2.8k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Agents Build

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource removal.

    2.8k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check: notes
  • Launch With AWS

    aws/agent-toolkit-for-aws

    Official

    Migrates vibe-coded web applications to AWS. An agent skill from aws/agent-toolkit-for-aws.

    2.8k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Official

    Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.

    2.8k GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • AWS Marketplace Metering

    aws/agent-toolkit-for-aws

    Official

    Deploys, queries, and debugs AWS Marketplace usage-based (PAYG) metering — the pipeline (ResolveCustomer, BatchMeterUsage, EventBridge via SAM) and querying/debugging metering records, statuses…

    2.8k GitHub stars~18k tokensUpdated yesterday
    Auto-check passed
  • Agents Pay

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying operator-defined spend limits.

    2.8k GitHub stars~6.5k tokensUpdated yesterday
    Auto-check: notes

Questions about Storing And Querying Vectors

What does Storing And Querying Vectors do?

Store and query vector embeddings using Amazon S3 Vectors, a cost-effective long-term vector storage service with its own API namespace (s3vectors). Storing And Querying Vectors is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Store and query vector embeddings using Amazon S3 Vectors, a cost-effective long-term vector storage service with its own API namespace (s3vectors).

When should I use Storing And Querying Vectors?

Storing And Querying Vectors fits situations like: : create S3 vector bucket; store embeddings; semantic search; RAG vector storage.

How do I install Storing And Querying Vectors in Claude Code?

Run `npx skills add aws/agent-toolkit-for-aws --skill storing-and-querying-vectors -a claude-code`. Or copy the skill folder (plugins/aws-data-analytics/skills/storing-and-querying-vectors in aws/agent-toolkit-for-aws) into .claude/skills/storing-and-querying-vectors in your project. Claude Code loads it when a task matches its description.

How do I install Storing And Querying Vectors in Codex?

Run `npx skills add aws/agent-toolkit-for-aws --skill storing-and-querying-vectors -a codex`. Or copy the skill folder (plugins/aws-data-analytics/skills/storing-and-querying-vectors in aws/agent-toolkit-for-aws) into .agents/skills/storing-and-querying-vectors in your project. Codex loads it when a task matches its description.

Can I use Storing And Querying Vectors in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aws/agent-toolkit-for-aws --skill storing-and-querying-vectors -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/storing-and-querying-vectors, .gemini/skills/storing-and-querying-vectors, .github/skills/storing-and-querying-vectors and .opencode/skills/storing-and-querying-vectors in your project.

What does Storing And Querying Vectors need to run?

Going by SKILL.md and its folder, Storing And Querying Vectors needs the command-line tools its instructions call (aws).

Does Storing And Querying Vectors access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Storing And Querying Vectors safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Storing And Querying Vectors use?

Storing And Querying Vectors is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Storing And Querying Vectors use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Storing And Querying Vectors?

Skills that share tags, products or a category with Storing And Querying Vectors: AWS S3 (sickn33/agentic-awesome-skills, 47k stars), Debugging Signals Pipeline (PostHog/posthog, 40k stars), Convex Runtime (IgorWarzocha/Opencode-Workflows, 122 stars) and Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Storing And Querying Vectors?

aws (a GitHub organization, an official publisher) maintains it in aws/agent-toolkit-for-aws, which has 2,835 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on October 9, 2026.

Source: aws/agent-toolkit-for-aws on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.