Skip to main content
orphan · aws

Bedrock Knowledge Base Idle

rule IDs covered
1
severity
medium

What does ZopNight detect here?

Bedrock knowledge bases showing zero RetrieveInvocations and RetrieveAndGenerateInvocations across a 30-day lookback are idle, yet their dedicated OpenSearch Serverless vector store keeps billing. ZopNight requires at least one metric to carry real datapoints before proving idleness, then recommends deletion with savings equal to the joined vector-store monthly cost.

Signal and threshold

How ZopNight evaluates Bedrock Knowledge Base Idle.
Field Value
Rule IDsRC-1606
Categoryorphan
Severitymedium
Metricnone — pure configuration read
Sourcebedrock_kb_idle.go

Telling an empty retrieval series from a real zero

  • resource.Type: bedrock-kb
  • MetricsAware: at least one of RetrieveInvocations / RetrieveAndGenerateInvocations, the retrieval counters named in Bedrock’s monitoring reference, present. AUTHORITATIVE-IDLENESS guard (bedrockKBHasRealSeries): these signals are published to CloudWatch Logs (not a CW metric series), so on real data the series is present-but-empty; the rule requires at least one present metric to carry real data (a finite datapoint or non-zero scalar) before proving idleness; otherwise it abstains (firing on the phantom-zero shape would flag every KB, fail-open). Then abstains if either present metric shows activity.
  • pricing: the linked vector store’s monthly cost (joined onto the KB UID by the aggregator; see PRODUCER below).

The 30-day retrieval lookback

Terminal window
bedrockKBLookbackDays=30

How the vector store cost is joined onto the KB

concrete-or-abstain (Category orphan: deleting an idle KB plus its underlying vector store recovers the full standing vector-store cost, a concrete cleanup lever). savings = cost, optimized = 0. PRODUCER (wired end-to-end, 2026-06-30):

  1. Discoverer (bedrock_agent.go enrichKBs) stamps metadata.vectorStoreUID = the bare collection id from the KB’s storageConfiguration.OpensearchServerlessConfiguration.CollectionArn (no extra SDK call, since GetKnowledgeBase already fetched). It equals the opensearch-serverless resource’s UID (see discoverer LIVE.md).
  2. Aggregator (cost.JoinBedrockKBVectorStoreCost, called by ComputeResourceCosts) joins the dedicated collection’s MonthlyCost onto the otherwise-free KB, and only when exactly one KB references that collection (no double-count; the collection keeps its own row). See aggregator COST.md (opensearch-serverless).
  3. Recommender (this rule) reads the joined cost via SetPricing[kbUID] and fires concretely with savings = cost when it is positive, abstains when it is $0/absent.

Deleting the KB and its vector store

  1. Confirm no application or agent depends on this KB
  2. Export source documents from S3 if needed
  3. Delete the KB and its associated OpenSearch Serverless / Pinecone collection
  4. Verify the underlying vector store no longer accrues charges

The two retrieval invocation counters

RetrieveInvocations, RetrieveAndGenerateInvocations (30-day lookback)

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

417 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

417 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·