Home icon

Query billion-scale vectors with SQL: Integrating Amazon S3 Vectors and Aurora PostgreSQL

Database Blog



This article explains how to integrate Amazon S3 Vectors with Aurora PostgreSQL to query billion-scale vector embeddings using SQL, combining vector similarity search with relational data filtering.

  • S3 Vectors provides cost-effective storage for massive embedding collections; Aurora PostgreSQL handles complex relational queries and metadata
  • AWS Lambda serves as translation layer between Aurora and S3 Vectors APIs using native aws_lambda extension
  • Query billion-vector datasets with sub-second cold performance and sub-100ms warm query latency
  • Combine vector similarity results with SQL filters (price, stock, tenant) in single queries
  • Security uses IAM role separation, VPC isolation, and no stored credentials
  • Trade-off: eventual consistency instead of ACID guarantees; Lambda adds 100-500ms latency versus Aurora pgvector's single-digit milliseconds
  • S3 Vectors costs $0.06/GB versus Aurora's $0.10/GB for storage; pay-per-query model favors infrequent use
  • CloudFormation template provided for infrastructure deployment; complete source code available on GitHub

This integration enables production applications to scale vector search independently from transactional workloads while maintaining familiar SQL interfaces for complex queries combining embeddings and relational data.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

May 5
2026
Amazon Aurora DSQL for global-scale financial transactions
May 12
2026
Migrating Amazon RDS for PostgreSQL to Amazon Aurora using seeded logical replication
Oct 24
2024
Visualize vector embeddings stored in Amazon Aurora PostgreSQL and explore semantic similarities
Jun 16
2026
Amazon S3 Vectors now supports up to 10,000 similarity search results per query

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.