I was building a RAG agent on AWS: an AI agent that answers questions by searching my own documents first. I created an Amazon Bedrock Knowledge Base, clicked Quick create for the vector store, tested a few questions and moved on to the next part of the project.

I wasn't using the knowledge base much. A handful of test questions, then nothing.

Then my AWS account hit its spending limit.

The total wasn't huge, under $25. But it built up in a short time, on something I thought was sitting there doing nothing. When I traced it, almost all of it came from one service: Amazon OpenSearch Serverless.

Here's what happened, why it happens, and how to make sure it doesn't happen to you.

In this post:

  • What "Quick create" sets up behind the scenes
  • Why OpenSearch Serverless charges you even when nobody is searching
  • How to find what's costing you money
  • Five ways to avoid the surprise

What Quick create actually sets up

A Bedrock Knowledge Base needs somewhere to store your documents as vectors: lists of numbers that capture the meaning of each piece of text, so the agent can find relevant passages by meaning rather than exact words. That storage is called a vector store.

When you choose Quick create a new vector store and pick OpenSearch Serverless, Bedrock creates an OpenSearch Serverless vector search collection and index for you, already set up with the fields it needs.

That's convenient. The catch is that the collection is a separate resource in your account, with its own bill. And it doesn't bill the way most people expect from something called "serverless".

Why it charges you when nobody is searching

OpenSearch Serverless measures computing power in OCUs (OpenSearch Compute Units). You pay for OCUs by the hour.

I assumed "serverless" meant "free when idle". For Classic collections, which is the kind I had, that's not the case:

  • When you create your first collection, OpenSearch Serverless starts a set of OCUs, some for adding data (indexing) and some for answering searches.
  • Those OCUs keep running even when there's no activity on the collection. They're the minimum capacity, and you're billed for them every hour.
  • With the default high-availability setting (redundancy on), the minimum is four half-OCUs: two for indexing and two for search. At the listed rate in US East (N. Virginia), AWS puts that at approximately $350 a month, before storage.
  • Later collections in the same account can share those OCUs, so the minimum mostly hits you on your first collection.

At that example rate, it's roughly 48 cents an hour, around the clock, whether you send one question or none. On a small test account with a spending limit, that runs out fast.

AWS has since released NextGen collections, which can scale to zero when idle. When I wrote this, AWS's own blog said NextGen collections weren't yet compatible with the Bedrock Knowledge Bases Retrieve API, and developers were reporting errors when they tried it. Check the current Bedrock documentation before you choose. Either way, find out which kind of collection you have, because Classic collections still carry that minimum.

How to find what's costing you money

If you're seeing charges you don't recognise, here's where to look:

  1. Open Billing and Cost Management → Cost Explorer.
  2. Group by Service, and set the date range to the last 7 days with daily detail.
  3. Look for Amazon OpenSearch Service. Serverless charges appear under it.

Billing data isn't instant. It can lag by hours, so don't assume a service is free just because today's charges haven't shown up yet.

Then check whether you have any collections still running:

aws opensearchserverless list-collections 

If a collection is listed and you don't need it, it's still charging you.

Five ways to avoid the surprise

1. Consider S3 Vectors for learning projects

When you quick-create a knowledge base, OpenSearch Serverless isn't your only choice. Amazon S3 Vectors is also an option. Bedrock creates an S3 vector bucket for you during knowledge base creation.

S3 Vectors is storage-based, so there are no always-on compute units ticking over in the background. It isn't free: you still pay for storage and requests. It also has trade-offs, such as no hybrid search (combining keyword and meaning-based search) and tighter limits on metadata.

For learning projects and RAG workloads that don't need very low latency or hybrid search, S3 Vectors can be a more cost-effective starting point. Move to OpenSearch when you actually need its speed and features.

2. If you need OpenSearch, turn off redundancy for dev and test

If you create the collection yourself, you can disable redundant replicas for development work. That lowers the minimum from four half-OCUs to two (one for indexing and one for search), which halves the idle cost to roughly $175 a month at the same example rate.

Keep redundancy on for production, where you need high availability.

3. Delete the collection, not just the knowledge base

This one catches a lot of people. The knowledge base and the OpenSearch collection are separate resources, and deleting the knowledge base can leave the vector store behind. When you're finished:

  1. Delete the knowledge base.
  2. Check for the OpenSearch Serverless collection it used.
  3. Delete the collection if you no longer need it.
  4. Check for anything else the project created, such as S3 buckets and IAM roles.
aws opensearchserverless list-collections aws opensearchserverless delete-collection --id <collection-id> 

You can also do this in the console under Amazon OpenSearch Service → Serverless → Collections. If you use NextGen collection groups, check the group's capacity settings as well.

4. Set up a budget alert before you build

AWS Budgets can email you when spending reaches an amount you choose:

  1. Open Billing and Cost Management → Budgets → Create budget.
  2. Choose a monthly cost budget with a small amount, for example $10.
  3. Add alerts at 50% and 80% of the amount, and add your email address.

Be clear about what this does. A budget alert warns you; it doesn't shut anything down. It gives you an earlier warning so you can investigate before the charges grow. (You can set up budget actions that respond automatically, but they need extra setup, and they won't stop every kind of resource.)

In my case, what stopped the charges was a spending limit already set on the account I was using, not anything I had configured. On a normal AWS account there's no such limit by default, so set up a budget alert before you start a project, not after the bill arrives.

5. Tear down at the end of every session

When you're learning, it's tempting to leave everything running "for tomorrow". With always-on services like this, that's exactly how small charges add up.

Get into the habit of a quick teardown at the end of each session: delete the collection, or the whole project stack if you used infrastructure as code. If your setup is scripted, rebuilding it the next day is quick. An idle Classic collection costs money every hour.

Quick checklist

  • You know which vector store your knowledge base uses, and whether an OpenSearch collection is Classic or NextGen.
  • You considered S3 Vectors for a learning project, or turned off redundancy for a dev OpenSearch collection.
  • A budget alert is set up, with email notifications, and you know it warns rather than stops charges.
  • aws opensearchserverless list-collections shows nothing you've forgotten about.
  • You delete the collection, not just the knowledge base, when you're done.

The takeaway

OpenSearch Serverless isn't a bad choice. Classic collections just have an idle cost, while NextGen and S3 Vectors bill in different ways, each with its own trade-offs.

The real lesson is broader: when a convenient wizard creates cloud resources for you, you still need to understand what it created and how that resource bills. "Serverless" doesn't always mean "free when idle".

My surprise was small because a spending limit stopped it. Without that limit, the same collection would have kept charging every hour until I noticed.

Have you been caught out by an AWS service that kept charging when idle? Share it in the comments so others can avoid it too.

Further reading

I drafted this post with help from an AI assistant, then checked the facts and edited it myself.