Goodbye expensive vector storage, hello S3 vectors

Preramble: I have been using vector databases briefly; getting deeply involved in the world of agents - One aspect that has always been a pain point is the cost of vector storage. AWS just released a new feature that allows you to store vectors in S3, making it a cost-effective solution for vector storage. In this post, I will share my experience with this new feature and how it can benefit your MVPs.

AWS Vector S3 Page

AWS S3 Vectors Page

What is vector storage? (quick introduction)

Vector storage is a method of storing data in a way that allows for efficient similarity search and retrieval. It is particularly useful for applications that involve machine learning, natural language processing, and recommendation systems. In vector storage, data is represented as high-dimensional vectors, which can be compared to find similar items. An example of this can be found in a memory database where you store vectors of embeddings that represent the context of a conversation or a document. This allows for quick retrieval of relevant information based on similarity to the query vector.

Why is vector storage expensive?

The biggest reason vector storage was expensive was due to it being emergent technology. Vector databases like Pinecone, Weaviate, and others were built specifically for this purpose, and they often come with a premium price tag. They offer advanced features like indexing, querying, and scaling, which can drive up costs. Additionally, the infrastructure required to support high-performance vector storage can be costly, especially for large datasets.

How does S3 vectors change the game?

Amazon’s S3 Vectors is a new S3 bucket type that lets you store and query vector embeddings natively in S3. It’s designed for AI workloads (semantic search, RAG, agent memory) and claims up to 90% lower cost than traditional in-memory or SSD-based vector DBs. S3 Vectors scales to billions of vectors and still delivers sub-second similarity search. Crucially, it natively integrates with AWS AI services.

Integration with AWS AI services

For me this is the biggest win. I can now use S3 vectors to store my embeddings and then use them in my RAG or agent pipelines without having to run a separate database. This means I can focus on building my application without worrying about the underlying infrastructure. The integration with AWS AI services also means that I can easily scale my application as needed, without having to worry about the cost of running a separate vector database. For example, S3 Vectors can feed Amazon Bedrock Knowledge Bases and be queried directly from Amazon SageMaker Unified Studio. In practice this means you can index embeddings (e.g. 1536‑dim vectors from Bedrock or OpenAI models) in S3 and use them in RAG or agent pipelines without running a separate DB.

Cost Comparison

I'm going to compare some of the most popular vector databases with S3 vectors. The cost of vector storage can vary significantly depending on the provider and the features offered. Here’s a quick comparison of some popular vector databases:

Provider Cost per 10M vectors, 6.8kbs each and 1M searches/month Notes
S3 Vectors $11/Month More 90% lower cost than traditional vector DBs, integrates with AWS AI services
MongoDB Atlas (M40) $388/Month Traditional MongoDB database with dedicated hosting.
Pinecone $920/Month A staple in the vector database space; Known for its performance and scalability, but expensive
Weaviate $180/Month Offers advanced features production level performance at a lower cost

It's fairly clear that S3 vectors is a game changer in terms of cost. It allows you to store and query vectors at a fraction of the cost of traditional vector databases, making it an ideal solution for MVPs and cost-sensitive applications.

Performance

But in all honesty, the cost savings are not painting the full picture - sure the 100-500ms response times provided by S3 vectors are great for building MVPs or applications that are not super latency sensitive, I can see this being extremely using for building experiments and prototypes. However, if you are building a production application that requires low latency and high throughput, you may want to consider using a dedicated vector database like Pinecone, Weaviate, MongoDB, etc. These databases are optimized for performance and can handle large datasets with ease.

Conclusion

In conclusion, S3 vectors is a such an exciting update for vector storage. It offers a cost-effective solution for storing and querying vectors, making it an ideal choice for MVPs, cost-sensitive applications, and experiments. The integration with AWS AI services makes it easy to manage and build your application, without having to worry about the cost of running a separate vector database. While it may not be the best choice for production applications that require low latency and high throughput, it is a great option for building experiments and prototypes. If you're looking for a way to store and query vectors without breaking the bank, S3 vectors is definitely worth considering.

Further Reading

  • Working with S3 Vectors
  • AWS S3 Vectors
  • AWS S3 Vectors Pricing
  • AWS Vector Databases