AWS Builder Center

Architecting Cost-Effective RAG for Financial Services: Amazon S3 Vectors, OpenSearch, and the Right Vector Storage Pattern for Every Workload

A reference architecture for financial institutions choosing between S3 Vectors, OpenSearch, and hybrid patterns for enterprise AI applications on AWS.

About This Post

Financial services organizations are rapidly adopting retrieval augmented generation (RAG) to power intelligent applications, from regulatory compliance assistants to client-facing wealth advisors. But as these applications scale from proof-of-concept to production, the cost of storing millions of vector embeddings becomes a material concern.
Amazon S3 Vectors introduces a fundamentally different approach: purpose-built vector storage with the durability, scalability, and cost-effectiveness of Amazon S3. For many financial services use cases, this eliminates the need for dedicated vector database infrastructure while maintaining sub-second query performance.
This post explores when S3 Vectors is the right choice for FSI workloads, when Amazon OpenSearch Service remains better suited, and walks through a practical use case: building a regulatory compliance knowledge assistant for a mid-size bank.
Who this is for: Cloud architects, data engineers, and AI/ML teams at financial institutions building or scaling RAG-based applications on AWS.
What you'll learn: Cost comparison, architectural trade-offs, a working FSI implementation pattern, and a decision framework for choosing between S3 Vectors and OpenSearch.

The Cost Challenge: Vector Storage in Financial Services

Financial institutions generate enormous volumes of data that benefit from vector embeddings:
  • Regulatory documents - SEC filings, OCC bulletins, FINRA rules, internal policies (thousands of documents, updated quarterly)
  • Client communications - Advisor notes, email summaries, meeting transcripts (millions of records)
  • Research & market intelligence - Analyst reports, earnings call transcripts, market commentary (continuously growing)
  • Transaction narratives - Wire descriptions, trade confirmations, compliance notes (billions of records over time)
A typical mid-size bank's RAG knowledge base might contain:
CorpusDocumentsChunks (avg 512 tokens)Vectors (1536-dim)
Regulatory library5,000500,000500K
Internal policies2,000150,000150K
Research reports10,0001,200,0001.2M
Client communications50,0002,000,0002M
Total67,0003,850,000~4M vectors
At this scale, traditional vector database costs add up quickly:
Vector StoreEstimated Monthly Cost (4M vectors, 1536-dim)Notes
OpenSearch Serverless (AOSS)~$700-$1,200/moMinimum 4 OCU baseline (2 indexing + 2 search)
OpenSearch Managed (OR1)~$400-$800/moCluster provisioned for peak load
Amazon S3 Vectors~$50-$150/moStorage-optimized pricing, pay per query
For a bank running multiple RAG applications across compliance, wealth management, and operations, the aggregate savings are substantial.

Amazon S3 Vectors: What Makes It Different

Amazon S3 Vectors is not a "vector database" - it's vector-native storage built directly into Amazon S3. This distinction matters:

Core Characteristics

FeatureS3 VectorsTraditional Vector DB
InfrastructureZero - fully serverless, no clusters or OCUsProvisioned or serverless with minimum capacity
Durability11 9s (S3 native)Depends on replication config
ScalingAutomatic - scales with data, no capacity planningRequires scaling policies or manual adjustment
Cold query latencySub-secondMilliseconds (but at higher cost)
Warm query latency~100ms10-50ms
Cost modelStorage + per-query pricingCapacity-based (pay even when idle)
Search typesSemantic (vector similarity)Semantic + keyword + hybrid + filtered

Why This Matters for Financial Services

  1. Compliance data is "write-heavy, read-sparse" - Regulatory documents are ingested and embedded continuously but queried only when an analyst, examiner, or AI agent needs them. Paying for always-on search infrastructure for infrequent queries is wasteful.
  2. Durability is non-negotiable - In regulated industries, losing embedded representations of compliance documents is an operational risk. S3's 11 9s durability eliminates that concern without complex backup strategies.
  3. Cost predictability - Financial institutions budget annually. S3 Vectors' storage-based pricing is predictable and doesn't spike with cluster scaling events.
  4. Multi-region / DR - S3 Cross-Region Replication works with vector buckets, giving you disaster recovery for your vector data with the same tools you already use for S3 objects.

When S3 Vectors Wins vs. When OpenSearch Wins

Choose S3 Vectors When:

Infrequent queries - Compliance lookups, periodic research retrieval, batch risk assessments (< 10 QPS sustained)
Large corpus, cost-sensitive - Millions of vectors where sub-second latency is acceptable
Simple semantic search - "Find the most relevant regulatory guidance for this scenario"
Long-term retention - Regulatory data that must be retained for 7+ years but searchable on demand
Bedrock Knowledge Bases integration - Fully managed RAG pipeline without custom infrastructure
Bursty workloads - Quarterly audit prep, exam readiness, annual report generation

Choose OpenSearch When:

High-throughput, low-latency - Client-facing chatbots, real-time trading assistants (> 50 QPS, < 50ms)
Hybrid search required - Combining keyword (BM25) + semantic (vector) for higher recall
Complex filtering - "Find relevant docs but ONLY for SEC Rule 15c3-5 AND published after 2024"
Aggregations - "Show me the distribution of compliance topics across our document corpus"
Real-time indexing - Streaming transaction embeddings with immediate searchability
Geo-spatial queries - Branch-level or regional compliance search

The Best of Both Worlds: OpenSearch + S3 Vector Engine

For financial institutions that need both cost optimization and advanced search, OpenSearch's S3 Vector Engine provides a hybrid architecture:
Data Flow:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[User Query]
|
v
[OpenSearch Managed Cluster (OR1)]
|
+--> Text fields, filters, aggregations (stored locally in OpenSearch)
|
+--> Vector fields (knn_vector, engine: "s3vector")
|
v
[Amazon S3 Vectors] <-- low-cost, durable vector storage
|
v
[Results merged in OpenSearch, returned to user]
You get OpenSearch's hybrid search, filtering, and aggregations - but vector storage costs drop to S3 pricing. This is ideal for FSI workloads that need advanced search capabilities but have large vector datasets.

FSI Use Case: Regulatory Compliance Knowledge Assistant

The Business Problem

A mid-size regional bank (~$30B in assets) needs to build an AI-powered compliance assistant that helps:
  • Compliance officers quickly find relevant regulatory guidance when reviewing new products or processes
  • Risk managers assess whether existing controls align with current regulatory expectations
  • Internal audit prepare for OCC/FDIC examinations by retrieving relevant precedents and policies
  • Front-line bankers get real-time answers on BSA/AML, fair lending, and consumer compliance questions
The bank has accumulated:
  • 3,500+ regulatory documents (OCC bulletins, FDIC FILs, Fed guidance, CFPB rules)
  • 1,200 internal policies and procedures
  • 800 past examination findings and responses (MRAs, MRIAs)
  • 5,000+ compliance committee meeting minutes

Why S3 Vectors Is the Right Fit

RequirementWhy S3 Vectors
Query frequency50-200 queries/day across all users - well within S3 Vectors' sweet spot
Latency toleranceCompliance research isn't real-time trading - sub-second is perfectly acceptable
Data retentionRegulatory data must be retained 7+ years - S3 durability and lifecycle policies are purpose-built for this
Cost sensitivityCompliance team has limited tech budget - can't justify $1K+/mo for a vector database serving 200 queries/day
SecurityS3 bucket policies + KMS encryption + VPC endpoints - familiar controls already approved by InfoSec
GrowthCorpus grows ~20% annually - S3 scales without capacity planning

Architecture

Component Architecture:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
AWS Cloud (VPC)
================

+-------------------+ +-------------------------+ +--------------------+
| Compliance | | Amazon Bedrock | | Amazon S3 Vectors |
| Assistant UI | ---> | | ---> | |
| (internal web app)| | * Knowledge Base | | * Vector Bucket |
| | <--- | * Claude Sonnet | <--- | * 4M+ vectors |
| | | * Guardrails (PII) | | * 11 9s durability |
+-------------------+ +------------+-------------+ +--------------------+
|
v
+------------------------+
| S3 Data Source |
| |
| * Regulatory PDFs |
| * Internal policies |
| * Exam findings |
| * Committee minutes |
+------------------------+

Implementation: Bedrock Knowledge Base with S3 Vectors

Step 1: Create the S3 Vector Bucket
1
2
3
4
aws s3vectors create-vector-bucket \
--vector-bucket-name compliance-kb-vectors \
--encryption-configuration \
EncryptionType=aws:kms,KMSKeyArn=arn:aws:kms:us-east-1:123456789:key/compliance-key
Step 2: Create a Vector Index
1
2
3
4
5
6
7
8
9
10
11
aws s3vectors create-vector-index \
--vector-bucket-name compliance-kb-vectors \
--vector-index-name regulatory-docs-index \
--dimension 1024 \
--distance-metric cosine \
--metadata-configuration '{"fields": [
{"name": "source_agency", "dataType": "str"},
{"name": "document_type", "dataType": "str"},
{"name": "effective_date", "dataType": "str"},
{"name": "topic_area", "dataType": "str"}
]}'
Step 3: Create Bedrock Knowledge Base with S3 Vectors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import boto3

bedrock_agent = boto3.client('bedrock-agent', region_name='us-east-1')

# Create Knowledge Base pointing to S3 Vectors
response = bedrock_agent.create_knowledge_base(
name='regulatory-compliance-kb',
description='Bank regulatory guidance, internal policies, and exam findings',
roleArn='arn:aws:iam::123456789:role/BRKBComplianceRole',
knowledgeBaseConfiguration={
'type': 'VECTOR',
'vectorKnowledgeBaseConfiguration': {
'embeddingModelArn': 'arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v2:0',
'embeddingModelConfiguration': {
'bedrockEmbeddingModelConfiguration': {
'dimensions': 1024
}
}
}
},
storageConfiguration={
'type': 'S3_VECTORS',
's3VectorsConfiguration': {
'bucketName': 'compliance-kb-vectors',
'vectorIndexName': 'regulatory-docs-index'
}
}
)
Step 4: Sync Documents and Query
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Sync regulatory documents from S3 data source
bedrock_agent.start_ingestion_job(
knowledgeBaseId=kb_id,
dataSourceId=data_source_id
)

# Query the compliance assistant
bedrock_runtime = boto3.client('bedrock-agent-runtime', region_name='us-east-1')

response = bedrock_runtime.retrieve_and_generate(
input={'text': 'What are the OCC expectations for BSA/AML transaction monitoring model validation?'},
retrieveAndGenerateConfiguration={
'type': 'KNOWLEDGE_BASE',
'knowledgeBaseConfiguration': {
'knowledgeBaseId': kb_id,
'modelArn': 'arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-sonnet-4-20250514-v1:0',
'generationConfiguration': {
'guardrailConfiguration': {
'guardrailId': 'compliance-guardrail',
'guardrailVersion': '1'
}
}
}
}
)

print(response['output']['text'])
# Returns: Comprehensive answer with citations to specific OCC bulletins

What a Compliance Officer Sees

Query: "What are the supervisory expectations for third-party risk management of AI/ML vendors?"
Response:
Based on the OCC's Third-Party Risk Management guidance (OCC Bulletin 2023-17) and the Interagency Guidance on Third-Party Relationships (June 2023), the supervisory expectations for AI/ML vendor management include:1. Due diligence must assess the vendor's model governance framework, including documentation of training data, model validation processes, and ongoing monitoring (OCC 2023-17, §III.B.2)
2. Contractual provisions should include rights to audit AI models, requirements for explainability documentation, and data deletion upon termination (Interagency Guidance, Appendix A)
3. Ongoing monitoring should include periodic model performance reviews, bias testing, and validation that the vendor's AI outputs remain within acceptable parameters (SR 11-7, Model Risk Management)Your internal Policy CP-2024-031 (Third-Party AI/ML Vendor Assessment Framework) requires annual independent review of all Tier 1 AI vendors with findings reported to the Board Risk Committee.Sources: OCC Bulletin 2023-17 (p.23-27), Interagency Guidance June 2023 (p.45), Internal Policy CP-2024-031 (§4.2)

Cost Comparison: Real Numbers for a Regional Bank

Scenario: 4 Million Vectors, 1536 dimensions, ~200 queries/day

ComponentS3 Vectors + Bedrock KBOpenSearch ServerlessOpenSearch Managed + S3 Vector Engine
Vector storage~$60/mo (S3 pricing)~$700/mo (4 OCU minimum)~$80/mo (S3-backed)
Compute/search~$40/mo (per-query)Included in OCUs~$300/mo (OR1 instances)
Embedding generation~$15/mo (Titan)~$15/mo (Titan)~$15/mo (Titan)
Source document storage~$5/mo (S3 Standard)~$5/mo (S3 Standard)~$5/mo (S3 Standard)
Total estimated~$120/mo~$720/mo~$400/mo
Annual cost~$1,440/yr~$8,640/yr~$4,800/yr
S3 Vectors delivers ~83% savings compared to OpenSearch Serverless for this workload pattern.

When the Math Flips

At higher query volumes, OpenSearch becomes more cost-effective:
Queries/DayS3 VectorsOpenSearch ServerlessWinner
200~$120/mo~$720/moS3 Vectors
1,000~$200/mo~$720/moS3 Vectors
5,000~$500/mo~$720/moS3 Vectors
20,000+~$1,500/mo~$720/moOpenSearch
50,000+ (real-time)Not recommended~$1,000/moOpenSearch
Rule of thumb: If your FSI application has < 10,000 queries/day and doesn't need hybrid search or complex filtering, S3 Vectors is the cost-optimal choice.

Decision Framework for FSI Teams

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
START --> Do you need hybrid search (keyword + semantic)?
|
|-- YES --> Use OpenSearch (Managed or Serverless)
|
|-- NO --> Do you need < 50ms latency consistently?
|
|-- YES --> Use OpenSearch Serverless
|
|-- NO --> Is query volume > 10,000/day?
|
|-- YES --> Use OpenSearch + S3 Vector Engine
|
|-- NO --> Do you want fully managed RAG?
|
|-- YES --> Bedrock Knowledge Base + S3 Vectors
|
|-- NO --> S3 Vectors API (custom RAG pipeline)

Security & Compliance Controls

ControlS3 Vectors ImplementationRegulatory Relevance
Encryption at restSSE-KMS with customer-managed keysOCC Heightened Standards, GLBA Safeguards
Encryption in transitTLS 1.2+ (enforced via bucket policy)PCI DSS Req 4.1
Access controlIAM policies + S3 bucket policies + VPC endpointsPrinciple of least privilege
Audit loggingCloudTrail for all S3 Vectors API callsOCC Bulletin 2023-17, SOX
Data residencyRegional bucket - vectors never leave the regionData localization requirements
RetentionS3 Object Lock for WORM complianceSEC Rule 17a-4, FINRA 4511
Disaster recoveryCross-Region Replication for vector bucketsBusiness continuity / RTO requirements

Getting Started: 3 Paths for FSI Teams

Path 1: Fastest (Fully Managed)

Bedrock Knowledge Base + S3 Vectors - No infrastructure to manage. Upload documents to S3, create a Knowledge Base, select S3 Vectors as the store. Query via API or integrate with a chatbot. Production-ready in days.

Path 2: Advanced Search Needed

OpenSearch + S3 Vector Engine - Get hybrid search and filtering while keeping vector storage costs low. Best when compliance search needs to combine keyword precision with semantic recall.

Path 3: Custom RAG Pipeline

S3 Vectors API directly - Use with Strands Agents SDK or LangChain for full control over chunking, embedding, and retrieval logic. Best for teams building differentiated AI applications.

Conclusion

For financial services organizations, the choice between S3 Vectors and OpenSearch isn't binary - it's about matching the right tool to the right workload pattern:
  • S3 Vectors excels for cost-sensitive, compliance-heavy workloads with moderate query volumes - the majority of FSI internal knowledge applications
  • OpenSearch excels for high-throughput, low-latency, advanced-search workloads - client-facing assistants and real-time analytics
  • OpenSearch + S3 Vector Engine provides the middle ground - advanced search capabilities with S3-tier storage costs
The regulatory compliance assistant we built demonstrates how a bank can go from zero to production-ready AI-powered compliance search at ~$120/month - a fraction of what traditional vector database approaches would cost. That's not just a technical win - it's the kind of cost profile that gets compliance and risk teams to say yes to AI adoption.
Start with S3 Vectors for your next internal RAG application. Scale to OpenSearch when the use case demands it. AWS gives you the flexibility to make that choice independently for each workload.

Nayan Karumuri is a Solutions Architect at AWS specializing in financial services modernization and AI/ML adoption strategies.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article