Skip to main content

Bedrock Knowledge Base Cost for Gmail and Google Drive

Cost Optimization & FinOpsUpdated Kevin W.9 min read

Quick summary: Checked 28 November 2026: a managed Bedrock knowledge base bills $5 per GB of raw data a month. A 1,000 GB Drive and Gmail archive is $5,000 a month, about $164 a day, before retrieval.

Key Takeaways

  • Checked 28 November 2026: a managed Bedrock knowledge base bills $5 per GB of raw data a month
  • A 1,000 GB Drive and Gmail archive is $5,000 a month, about $164 a day, before retrieval
  • Bedrock has no native Gmail connector, so mail lands on the same meter through the custom connector or S3
  • Retrieve is $1.00 per 1,000 calls
  • Managed parsing, embeddings, and reranking are $0
Navy field with a large pale stack of sheets on the left and a smaller amber-edged stack on the right, joined by a thin amber line
Table of Contents

The worked number

One archive, list prices, no discounts:

LineArithmeticMonthly
Storage, 1,000 GB raw1,000 × $5.00$5,000.00
10,000 Retrieve calls10 × $1.00$10.00
Total$5,010.00

Divide $5,000 by 30.4 days and storage alone runs about $164 a day. Each extra 1,000 GB adds another $5,000 a month. If the meter reports 1,024 GB for the same data, storage is $5,120. We did not find the unit (10^9 or 2^30 bytes) stated on the pricing page, so read the quantity on your own bill. The worksheet prints the first two storage figures: python3 examples/architecture-blog-2026/gmail-drive-selective-kb/cost_worksheet.py. It does not call AWS and does not score retrieval.

Customer-managed knowledge bases bill differently: embeddings, the vector store, optional parsing and reranking, and the answer model, with no per-GB raw meter. The 9 October cost post prices that path for one 5,000-document corpus. S3 Vectors bills logical vector bytes, not source files. The S3 pricing page’s own example is 59 GB × $0.06 per GB-month = $3.54, and a terabyte of PDFs does not become a terabyte of vectors. Measure the chunk count on your curated set and price that.

Routing mail through the custom connector on a managed knowledge base does not avoid the storage price. Custom ingest only gets Gmail in. It still sits on the $5 meter.

Live search carries the archive

Gmail already has a search language. users.messages.list takes q in the Gmail search-box format and returns at most 500 messages per page. q does not work with the gmail.metadata scope, so a read-only agent needs gmail.readonly. Fetch the thread, not every quoted copy of it.

Drive’s files.list takes q for MIME type, modified time, parents, and full text, with a page size up to 1,000. If incompleteSearch is true, some results are missing. Narrow to user or one shared drive and search again.

Cap the pages. A question that needs the 40th page of hits has a query that is too wide. Keep the message id, thread id, and Drive webViewLink on every answer so a person can open the source. Cache by user, query, and scopes with a short TTL, and never share one user’s cache with another.

Live search fits when the question names a sender, label, filename, folder, or date. It fails when the answer is spread across several documents and no keyword you can write down finds them. Those are the questions to index.

Claude’s connectors do not carry over to Bedrock

Claude’s Google Workspace connectors let Claude search Gmail and Drive from a chat under the person’s own Google permissions. On Team and Enterprise plans an owner must enable them first. They live in Claude, so a Bedrock agent does not inherit them. The Anthropic API MCP connector is a third thing: a beta Messages API feature that calls remote MCP servers, and it does not reuse the OAuth grant a person clicked inside the Claude app.

A Bedrock agent needs its own grant. Per-user OAuth with gmail.readonly and drive.readonly fits an agent that answers as that person. Domain-wide delegation is an admin decision for a workspace-wide job. Do not give one shared admin token read access to every mailbox. Keep credentials in Secrets Manager, and log the tool, the user, and source ids, never message bodies.

Route the question, then retrieve

Python 3.12, no AWS SDK. Replace the topic set with the classes your scorecard actually failed.

def route(question: str, curated_topics: set[str]) -> str:
    text = question.casefold()
    if any(token in text for token in ("latest", "from:", "filename:")):
        return "live"
    if any(topic in text for topic in curated_topics):
        return "curated"
    if "policy" in text and "today" in text:
        return "both"
    return "live"

live calls Gmail or Drive. curated calls Knowledge Bases Retrieve on the small index. both runs both, and the model must say which source is newer. Use rules first, because a classifier model is another billed call. Log which rule fired.

Live search and the curated index must cover different content. A second retriever over the same corpus makes the agent reconcile two rankings, and a permission filter on only one of them is a hole. The draw.io diagram shows the full path with service icons.

What goes in the curated corpus

Index a document when the scorecard shows live search missed a repeated question and that document would have answered it:

  • Canonical files in named Drive folders, such as policies, vendor terms, and runbooks.
  • Threads with a label, sender, and date window the scorecard keeps failing.
  • A normalized summary, only if it stores the source link, the timestamp, and the fact that it is a summary.

Skip the rest of the mailbox. Quoted reply chains, signatures, and duplicate copies of a thread inflate raw gigabytes and repeat stale answers. Keep one thread record, the new message, and a hash of the normalized text so a re-sync does not re-embed an unchanged body. If two sources disagree, keep both with dates and let the model cite the conflict.

For mail, the job selects the thread, writes a normalized object to S3 with metadata (tenant, source, messageId, threadId, modifiedTime), and a customer-managed knowledge base syncs that prefix into S3 Vectors. Drive can take the same path when Gmail and Drive must share one index and one permission filter. The 1 KB and 35-key metadata cap means a long ACL will not fit. Enforce the ACL before the chunk is written.

The managed Drive connector is the other Drive option. It can limit shared drives, MIME types, a modified-date window, and file size (default 500 MB). Folder and file ids work with OAuth only. Document ACLs need a service account, and aclEnabled is fixed at creation. If you omit it, a service account defaults to on and OAuth to off. A redacted scope is in drive-filter.example.json. Pay for the managed connector when the bytes you will crawl times $5 are acceptable, the files live in Drive, and you want included hybrid search plus ACLs.

Four strategies compared

StrategyOngoing costRetrievalMain risk
Whole workspace in a managed knowledge base$5 per raw GB-month plus Retrieve. 1,000 GB is $5,000 a monthHybrid search includedThe hardest bill to cap once the crawl is wide. No Gmail connector
Live Gmail and Drive onlyGoogle API quota and a short cache. No vector storeStrong on lookups you can name, weak on the questions we missedYou own rate limits, stale history ids, and incompleteSearch
Scoped managed Drive connector plus live search$5 per GB of the scoped Drive set. Gmail stays off the meterHybrid on the Drive slice, keyword for mailWatch the raw GB of the scope
Curated S3 corpus, customer-managed knowledge base on S3 Vectors, plus live searchEmbeddings, S3 storage, vector bytes, optional rerank, model tokensSemantic only on the curated setThe most code. Do not reuse the $5,000 figure for this row

We recommend the fourth row for terabytes of files, millions of messages, Gmail in scope, and a handful of question classes that keyword search missed. The third row wins when the curated set is Drive-only and small enough that $5 per GB is dull. The second wins if the scorecard never shows a class live search misses. The first is how the daily bill got large.

Sync, permissions, and a stop switch

Gmail push uses users.watch, which you must call at least every 7 days. Google recommends daily, and history.list as the fallback when notifications go missing. If a stored historyId is rejected as too old, full-sync that mailbox and store the new id. Drive’s change log works the same way: take a start page token, poll changes.list, and treat push as a hint.

Knowledge base sync is incremental. Unchanged documents are skipped, changed ones are re-parsed, re-chunked, re-embedded, and re-indexed, and deleted ones leave the vector store. Managed connectors can sync daily, weekly, or monthly. Deletion protection (default threshold 15 percent) skips the delete phase when a sync would remove more than that share of the index. The custom connector does not support deletion protection, so you delete those documents yourself.

AWS CLI 2, bedrock-agent. The job must already be running, and no budget triggers this call.

aws bedrock-agent stop-ingestion-job \
  --knowledge-base-id "$KB_ID" \
  --data-source-id "$DS_ID" \
  --ingestion-job-id "$JOB_ID"

Make the writer idempotent with a content hash in the object key. Add a dead-letter queue for retried Google API errors, and a per-job cap on documents and bytes checked before StartIngestionJob. Put CloudWatch on documents written, documents refused, and job state, and put AWS Budgets on the Bedrock and S3 lines with a named human. A budget notification does not halt anything. The cap in the job and StopIngestionJob do.

Encrypt the curated bucket with a customer-managed key, and use one S3 prefix and one knowledge base per tenant, or a tenant filter on every Retrieve. If the permission model is “whoever can open the file in Drive,” prefer live search or the managed Drive ACL over a copied ACL in the vector index.

What to do this week

  1. Open Cost Explorer for the days ingestion ran and separate Bedrock, S3, S3 Vectors, and OpenSearch. The 9 October post shows the grouping calls.
  2. If a sync is running and you cannot explain the raw gigabytes, stop it with StopIngestionJob.
  3. Copy the scorecard and fill ten real questions, with no customer text in anything you commit. Run live search, your current index, and a small curated index against them, and record correctness, whether the citation opens the right source, latency, and cost per answered question.
  4. Run the worksheet and write your own indexed-GB figure next to the $5,000 illustration.
  5. Put a byte cap in front of the next StartIngestionJob, and index one folder or label only if step 3 showed it was worth it.

What this post doesn’t cover

Calendar. OCR of Gmail attachments. AgentCore Memory, which is session state, not this corpus. A measured retrieval score for the hybrid design. The line items of the bill that started this work. A universal corpus size. Amazon Kendra is no longer open to new customers as of 30 July 2026, so it is not a path forward. The RAG pipeline guide is the setup walkthrough. This page is the decision about what to store.

To review the bill and the scorecard before the next sync, talk to us about the retrieval path. The business entry is the knowledge agent page, and the AWS build is Amazon Bedrock. Price a self-managed corpus on the knowledge base calculator, and check S3 Vectors rates against the pricing page, not the calculator’s illustrative vector rates.

Sources

Frequently asked questions

When should we not index Gmail into a knowledge base?
Leave the mailbox on live Gmail API search when the question names a sender, label, date, or thread, and you have not shown that semantic search across several historical threads beats that query. A managed knowledge base bills raw gigabytes at $5 per GB-month, so millions of messages add up fast. Index a thread only after your evaluation sheet shows live search missed it.
What goes wrong if a budget alert is the only spending stop?
AWS Budgets and Cost Anomaly Detection notify people. They do not cancel a running ingestion job. StopIngestionJob stops a job that is already running, and only if something calls it. Put a document and byte cap in the ingestion function before StartIngestionJob, and page a human who can call StopIngestionJob.
Can an Amazon Bedrock agent call Claude's Google Workspace connectors?
No. Those connectors run inside Claude, on the Google account a person connected there. The Anthropic API MCP connector is a different feature: the Messages API calls a remote MCP server. A Bedrock agent needs its own Google OAuth or domain-wide delegation and its own Gmail and Drive tools.
Does Bedrock have a native Gmail knowledge base connector?
Not on the managed connector pages checked 28 November 2026. They list Google Drive, S3, SharePoint, OneDrive, Confluence, Salesforce, a web crawler, Box, Dropbox, ServiceNow, Zendesk, and a custom connector. Gmail is not among them, so mail has to go in through the custom connector or an S3 bucket your own job fills.
When is S3 Vectors the wrong store for this corpus?
When you need hybrid keyword and vector search, or the lowest query latency. S3 Vectors with Knowledge Bases is semantic search only, and AWS documents sub-second cold and as low as 100 ms warm queries. A small Drive-only set that needs document ACLs and hybrid search can stay on the managed Google Drive connector.
When is the managed Google Drive connector the better bill?
When the content is Drive-native, you have measured the raw gigabytes, and those gigabytes times $5 per month fit a budget you will watch. The managed path includes parsing, embeddings, reranking, and hybrid search. It is a poor default for a multi-terabyte workspace.
Kevin W.
Kevin W.

Ecommerce Growth & Retail Marketplaces

Ecommerce growth leader working across ratings and reviews, Walmart review syndication, retail marketplaces, and email and SMS deliverability. Writes the FactualMinds guides on AWS cost optimization and FinOps for teams that need cloud spend to stay predictable.

Ecommerce GrowthRatings & ReviewsRetail MarketplacesEmail & SMSAWS Cost OptimizationFinOps

Recommended Reading

Explore All Articles »