bedrock-claude-chat icon indicating copy to clipboard operation
bedrock-claude-chat copied to clipboard

[Feature Request] Is there any stats available for Amazon Bedrock Knowledge Database cost?

Open typex1 opened this issue 10 months ago • 7 comments

Describe the solution you'd like

I set up the full project stack keeping all settings default. Among them, enableRagReplicas=true. As a consequence, all my OpenSearch collections are set up with "Deployment type = Enabled redundancy" Currently, I have two collections in place, one is 2.9mb in size (1 document), the other one 2.3mb (3 documents). I am interested in a more cost-effective vectorstore solution, as I want to scale to thousands of documents.

Why the solution needed

With my current setup, I have Opensearch cost of already 11.50 US$ in Region Frankfurt. Either I have done something wrong or otherwise I would consider this cost level as not acceptable.

Additional context

To be able to compare, I created a new Opensearch collection today, with enableRagReplicas=false. I would assume that this collection will have half of the cost than the redundant option, but I will see in a couple of days, or otherwise any comment on this cost level is appreciated. The Opensearch cost related documentation I found so far is not really going into that detail.

Implementation feasibility

Are you willing to collaborate with us to discuss the solution, decide on the approach, and assist with the implementation?

  • [ ] Yes, I am able to implement the feature and create a pull request.
  • [X] No, I am unable to implement the feature, but I am open to discussing the solution.

typex1 avatar Jan 13 '25 15:01 typex1

The OpenSearch Serverless OCU is calculated by account / region level. Have you removed all the bots which are deployed by enableRagReplicas=true?

statefb avatar Jan 14 '25 02:01 statefb

Yes I removed the bots and, as the collections have not been removed automatically, also the collections. What I have now is a single non-replicated collection in us-east-1. Cost is now at 3.36 US$ for a single day, even without bot requests. Collection size 2.6mb -> see screenshots. Any other figures from anyone?

Image Image

typex1 avatar Jan 17 '25 08:01 typex1

@typex1 If the bots which are deployed with enableRagReplicas=true are deleted, OCU will decrease to 1.0. This is the out of scope of this repo. Could you ask to AWS support?

statefb avatar Jan 21 '25 08:01 statefb

I have a similar issue, as since v2.3.3 version it stopped costing on Aurora serverless and moved to opensearch, and immediatley jumped in daily costs 3x. I have NO collections, RAGs or otherwise, and it costs me $3.4 daily. There is something wrong with the application, and am not sure how to mitigate.

Atlogit avatar Jan 23 '25 16:01 Atlogit

As described here, you might want to check both regions bedrockRegion and app region.

statefb avatar Jan 24 '25 01:01 statefb

As described here, you might want to check both regions bedrockRegion and app region.

not sure what you mean, @statefb , I don't see this on the provided link. More important: I don't use knowledge base or have bots (execpt the default internet bot, without adding any files)

Atlogit avatar Jan 27 '25 09:01 Atlogit

I did the math today: based on the official pricing https://aws.amazon.com/opensearch-service/pricing/ , and assuming we have a non-redundant collection, that is going to be 0.5 OCU for search and query, and another 0.5 OCU for indexing.

For us-east-1, that means 0,24 * 24 = 5,67 US$ per day. This will be the absolute minimum daily cost, even if you have (theoretically) 0mb of data. That leaves you with 172 US$ per month. Having a 2.64mb collection size, I pay 5,76 US$ per day now (see screenshot) which exactly matches the calculation - 9 cents are paid for the storage. Even if there are no requests, this is my current daily payment.

Image

typex1 avatar Feb 05 '25 09:02 typex1