Choosing Storage for ML Data by Cost, Performance, Structure and Compliance
This lesson explains how storage decisions balance cost, performance, data structure and compliance, and how to choose the option that serves the dominant factor without breaking the others.
Learning outcomes
After completing this lesson, you will be able to:
- Reduce cost with storage classes and lifecycle rules.
- Choose storage that keeps accelerators supplied with data.
- Match storage to the structure of the data and compliance rules.
Cost: storage classes and lifecycle rules
ML projects accumulate raw data, intermediate datasets, checkpoints and model artefacts that are rarely read after a few weeks. S3 storage classes price storage by access frequency. S3 Standard suits active datasets; S3 Intelligent-Tiering moves objects between tiers automatically when access patterns are unknown; S3 Standard-IA suits data read occasionally; and the S3 Glacier classes suit archives such as old training snapshots kept for audits.
Lifecycle rules transition objects to cheaper classes after a set age and expire temporary files such as old checkpoints. Applying them by prefix, for example checkpoints/ or raw/, keeps active data in Standard while archiving the rest.
The following diagram shows the storage design for a hospital group's archive of medical scans: where a scan is stored as it ages and the controls that protect it.

Choose the storage class
Performance: throughput and latency
Training performance depends on how quickly data reaches the accelerators. S3 scales to very high aggregate throughput, especially when requests are spread across prefixes. FSx for Lustre provides sub-millisecond latency and hundreds of gigabytes per second for distributed training. S3 Express One Zone offers single-digit millisecond access in one Availability Zone, which suits repeated reads of small objects during training. EFS suits shared home directories and moderate datasets, and EBS suits the local volume of a single instance.
Feed the GPUs
Structure and compliance
The structure of the data suggests the store: objects such as images and documents belong in S3; curated tabular data belongs in S3 as Parquet, in a data warehouse such as Amazon Redshift or as features in SageMaker Feature Store; embeddings belong in a vector store; and low-latency key lookups belong in DynamoDB or the Feature Store online store.
Compliance requirements add controls. Encrypt data at rest with AWS KMS customer managed keys when the organisation must control key policies and rotation. Turn on S3 Block Public Access. Use S3 Object Lock in compliance mode when training datasets or model versions must be kept unchanged for audits. Keep data in Regions that satisfy residency laws, and use Amazon Macie to discover personal data that should be masked before training.
The following table summarises the factors and the matching storage choices.
| Dominant factor | Typical choice |
|---|---|
| Lowest cost for data rarely read | S3 Standard-IA or Glacier classes with lifecycle rules |
| Unknown access pattern | S3 Intelligent-Tiering |
| Highest training throughput | FSx for Lustre linked to S3 |
| Shared file system for notebooks | Amazon EFS |
| Immutable audit copies | S3 Object Lock (compliance mode) |
| Customer-controlled encryption | SSE-KMS with a customer managed key |
Meet the compliance rule
A medical imaging archive
A hospital group stores 300 TB of de-identified scans for model training. New scans are used heavily for the first month, then rarely, but every scan used to train a released model must be kept unchanged for seven years. Data must stay in the EU.
| Requirement | Configuration |
|---|---|
| Heavy use in the first month, rare later | Lifecycle rule: Standard to Standard-IA at 30 days, Glacier Flexible Retrieval at 180 days |
| Training datasets unchanged for seven years | Copy each released training set to a bucket with Object Lock compliance retention of 7 years |
| EU residency | Buckets and training jobs only in EU Regions |
| Fast distributed training on new scans | FSx for Lustre linked to the active prefix during training runs |
Putting everything in S3 Standard would meet the functional needs at several times the cost, and relying on versioning alone would not stop authorised users from deleting versions, which the audit requirement rules out.
Which storage gives the highest throughput for distributed training?
Show answer
Amazon FSx for Lustre.
Exam Tips
Remember for the exam
- Unknown or changing access patterns: S3 Intelligent-Tiering.
- Expire old checkpoints and temporary files with lifecycle rules.
- Highest throughput for distributed training: FSx for Lustre.
- Write-once retention for audits: S3 Object Lock in compliance mode.
- Residency requirements constrain the Regions used for storage and processing.