# Gmail and Drive selective knowledge base

Worksheet and diagram for the FactualMinds post on Bedrock knowledge base cost for Gmail and Google Drive.

This folder does not call AWS, Google, or a model. It does not contain customer mail or file names. It prints list-price storage math and holds a blank evaluation sheet.

Checked 10 October 2026.

## Run the storage illustration

```bash
python3 examples/architecture-blog-2026/gmail-drive-selective-kb/cost_worksheet.py
```

Expected lines include:

```text
1,000 GB x $5.00 = $5,000.00 per month
1,024 GB x $5.00 = $5,120.00 per month
```

The script also prints a daily illustration (monthly total divided by 30.4) and the S3 Vectors example unit rates. It refuses to multiply those vector rates by a terabyte of raw Drive or mailbox bytes.

## Files

| File | What it is |
| --- | --- |
| `cost_worksheet.py` | Managed Knowledge Base raw-storage illustration at $5 per GB-month |
| `drive-filter.example.json` | Redacted managed Google Drive connector scope. Folder ids require `OAUTH2`. `aclEnabled` is permanent after create. Service-account ACLs are a different auth choice. |
| `evaluation-scorecard.md` | Empty score sheet. Fill it with your questions before you grow the index. |
| `gmail-drive-hybrid-knowledge-base.drawio` | Reference diagram. Open in diagrams.net. |

Diagram preview is generated from the `.drawio` file. The post links this folder.

## Rates this worksheet uses

- Managed Knowledge Base index storage: $5.00 per GB of raw data per month. [Bedrock pricing](https://aws.amazon.com/bedrock/pricing/), checked 10 October 2026. The page does not say whether that GB is decimal or binary.
- S3 storage GB, for S3 itself: binary, 1 TB = 1,024 GB. [S3 pricing](https://aws.amazon.com/s3/pricing/).
- S3 Vectors example on that same S3 page: $0.06 per GB-month logical storage, $0.20 per GB PUT, $2.50 per million query API requests. Data-processed tiers in the worked example are $0.004 per TB for the first 100,000 vectors and $0.002 per TB after that. Returned data has a 500 KB free allowance per query in that example. Confirm the regional price list before you budget.
