Skip to content

Overview

Amazon S3 Vectors
Amazon S3 Vectors — a purpose-built vector storage capability within S3 that enables similarity search over embeddings without a separate vector database.
is a purpose-built vector storage capability within Amazon S3. It lets you store, index, and query high-dimensional vector embeddings without provisioning or managing a separate vector database.

Your entire vector search infrastructure becomes two Terraform resources:

resource "aws_s3vectors_vector_bucket" "this" {
vector_bucket_name = "my-vectors"
}
resource "aws_s3vectors_index" "this" {
vector_bucket_name = aws_s3vectors_vector_bucket.this.vector_bucket_name
index_name = "embeddings"
dimension = 1024
distance_metric = "cosine"
data_type = "float32"
}

That’s it. No clusters, no capacity planning, no connection pooling.

This walkthrough documents a working application: an AWS announcements briefing system that:

  1. Fetches AWS What’s New and AWS News Blog RSS feeds daily
  2. Embeds each article into a 1024-dimensional vector via Titan Embeddings V2
    Amazon Titan Embeddings V2 — the Bedrock foundation model used to generate 1024-dimensional text embeddings.
  3. Stores vectors in S3 Vectors with metadata (title, URL, date, feed)
  4. Serves a web UI where authenticated users ask questions
  5. Searches vectors for relevant articles, then generates grounded answers via Claude

Architecture layers — showing the full stack from browser through API Gateway, Lambda, S3 Vectors, and Bedrock

ResourcePurposeFile
aws_s3vectors_vector_bucketVector storage containers3_vectors.tf
aws_s3vectors_index1024-dim cosine indexs3_vectors.tf
aws_s3_bucketSource document storages3.tf

aws_lambda_function (×2)

Ingest + Query handlers

lambda_ingest.tf, lambda_query.tf

aws_apigatewayv2_apiHTTP API with JWT authapi_gateway.tf
aws_cognito_user_poolUser authenticationcognito.tf
aws_amplify_appSPA hostingamplify.tf
aws_cloudwatch_event_ruleDaily ingest schedulelambda_ingest.tf
SectionContent
S3 VectorsConcepts, Terraform resources, API operations, IAM permissions
RAG PipelineIngest flow, query flow, embedding strategy, similarity scoring
DeploymentPrerequisites, terraform apply, Cognito users, web UI
TroubleshootingBedrock errors, common issues, debugging