By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Data storage and management are the backbone of any ML pipeline. Whether you're training a fraud detection model on streaming transactions, building a recommendation engine with petabytes of user behavior data, or deploying a real-time inference endpoint, how and where you store data determines performance, cost, and scalability. For example: - A retail recommendation system might use S3 for raw clickstream data, Redshift for aggregated user profiles, and DynamoDB for low-latency feature lookups during inference.- A fraud detection pipeline could ingest transactions into Kinesis Data Streams, store processed features in SageMaker Feature Store, and use Lake Formation to enforce fine-grained access controls.
This guide covers AWS’s core storage services, their trade-offs, and how to choose the right one for ML workloads.
ML Use Case: Storing training data, model artifacts, and batch inference outputs.
Amazon Redshift: Columnar data warehouse optimized for analytical queries (OLAP). Best for aggregating structured data (e.g., user behavior, sales records) before training. Supports Redshift Spectrum to query data directly in S3 without loading it into the warehouse.
ML Use Case: Preprocessing large datasets for batch training (e.g., aggregating customer purchase history).
Amazon RDS (Relational Database Service): Managed SQL database (PostgreSQL, MySQL, etc.) for transactional data (OLTP). Best for structured data with frequent reads/writes (e.g., user profiles, product catalogs).
ML Use Case: Storing labeled training data or metadata (e.g., customer IDs, timestamps).
Amazon DynamoDB: NoSQL key-value/document database for low-latency, high-throughput access. Best for real-time feature stores, session data, or metadata (e.g., user preferences, device states).
ML Use Case: Storing online features for real-time inference (e.g., user embeddings for recommendations).
AWS Lake Formation: Governance layer for S3-based data lakes. Simplifies data cataloging, access control, and fine-grained permissions (e.g., restricting access to PII). Works with Glue Data Catalog for schema management.
Example: Storing user embeddings in DynamoDB for real-time recommendations.
Data Lake vs. Data Warehouse:
Data Warehouse (Redshift): Stores structured, processed data for analytics and reporting. Best for aggregated features.
Batch vs. Streaming Data:
Streaming (Kinesis, DynamoDB): Processed in real-time (e.g., fraud detection).
ACID vs. BASE:
Use Lake Formation to define data access policies (e.g., restrict PII access).
Process Data with Glue/EMR
Write processed features to S3 (offline store) and DynamoDB (online store).
Register Features in SageMaker Feature Store
Define feature definitions (e.g., user_id, last_purchase_category).
user_id
last_purchase_category
Query Features for Training & Inference
Inference: Query the online store (DynamoDB) via SageMaker Endpoints for low-latency predictions.
Monitor Feature Drift
s3://bucket/data/
s3://bucket/year=2023/month=01/
"S3 vs. EFS vs. FSx for Lustre?"
Cost Optimization
Redshift Costs: Concurrency scaling adds cost; use WLM (Workload Management) to prioritize queries.
Security & Compliance
SELECT
KMS Encryption: Required for HIPAA/GDPR compliance; enabled by default in SageMaker Feature Store.
Performance Pitfalls
A fintech company needs to store real-time transaction data for fraud detection. The system must support millions of reads/writes per second with single-digit millisecond latency. Which AWS service should they use? ✅ Answer: DynamoDBExplanation: DynamoDB is optimized for high-throughput, low-latency access, making it ideal for real-time feature serving.
A data scientist wants to query a 10TB dataset in S3 without loading it into a database. They need SQL support and cost efficiency. Which AWS service should they use? ✅ Answer: Amazon Athena (or Redshift Spectrum) Explanation: Athena allows serverless SQL queries on S3 data, while Redshift Spectrum extends Redshift to query S3 directly.
A retail company is building a recommendation system and needs to store user embeddings for real-time inference. The embeddings are updated hourly and must be accessed with <10ms latency. Which storage solution is best? ✅ Answer: SageMaker Feature Store (online) + DynamoDBExplanation: The online store in SageMaker Feature Store uses DynamoDB for low-latency access, while the offline store (S3) handles batch updates.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.