Storage Classes
Standard, Infrequent Access, and Glacier storage classes. Lifecycle transitions, cost optimization.
NFYio offers multiple storage classes to balance cost and access patterns. Choose the right class for each object or use lifecycle rules to automatically move data to cheaper tiers as it ages.
Available Storage Classes
| Class | Use Case | Access Latency | Retrieval | Cost |
|---|---|---|---|---|
| STANDARD | Frequently accessed data | Low | Immediate | Highest |
| STANDARD_IA | Infrequent Access — backups, archives | Low | Immediate | Lower |
| GLACIER | Long-term archival, rarely accessed | Higher | Minutes to hours | Lowest |
Standard
- Best for: Active data, hot storage, frequently read/written objects
- Access: Immediate, low latency
- Use when: Objects are accessed regularly (e.g., user uploads, application assets)
Infrequent Access (STANDARD_IA)
- Best for: Backups, logs, data accessed less than once a month
- Access: Immediate, same as Standard
- Cost: Lower storage cost; may have retrieval fees
- Use when: You need occasional access but want to reduce storage costs
Glacier
- Best for: Long-term archival, compliance, data rarely or never retrieved
- Access: Retrieval can take minutes to hours (restore process)
- Cost: Lowest storage cost; retrieval has higher cost and delay
- Use when: Data is stored for compliance or disaster recovery, not regular access
Setting Storage Class
On Upload
AWS CLI:
aws s3 cp backup.tar.gz s3://my-bucket/archives/backup.tar.gz \
--storage-class STANDARD_IA \
--endpoint-url https://storage.yourdomain.com
JavaScript:
await client.send(new PutObjectCommand({
Bucket: 'my-bucket',
Key: 'archives/backup.tar.gz',
Body: fileStream,
StorageClass: 'STANDARD_IA',
}));
Default Bucket Storage Class
Set a default storage class for the bucket so new objects use it unless overridden:
aws s3api put-bucket-storage-class \
--bucket my-bucket \
--storage-class STANDARD_IA \
--endpoint-url https://storage.yourdomain.com
Lifecycle Transitions
Automatically move objects between storage classes based on age. Define rules in the bucket lifecycle configuration.
Example: Logs Bucket
Move logs to Infrequent Access after 30 days, then to Glacier after 90 days:
{
"Rules": [
{
"ID": "LogsLifecycle",
"Status": "Enabled",
"Filter": { "Prefix": "logs/" },
"Transitions": [
{ "Days": 30, "StorageClass": "STANDARD_IA" },
{ "Days": 90, "StorageClass": "GLACIER" }
]
}
]
}
Example: Backup Retention
Keep backups in Standard for 7 days (recent restores), then move to Glacier for 1 year:
{
"Rules": [
{
"ID": "BackupLifecycle",
"Status": "Enabled",
"Filter": { "Prefix": "backups/" },
"Transitions": [
{ "Days": 7, "StorageClass": "STANDARD_IA" },
{ "Days": 30, "StorageClass": "GLACIER" }
],
"Expiration": { "Days": 365 }
}
]
}
Versioned Buckets
Transition noncurrent versions (old versions after overwrite or delete):
{
"Rules": [
{
"ID": "OldVersionsToGlacier",
"Status": "Enabled",
"Filter": {},
"NoncurrentVersionTransitions": [
{ "NoncurrentDays": 30, "StorageClass": "STANDARD_IA" },
{ "NoncurrentDays": 90, "StorageClass": "GLACIER" }
],
"NoncurrentVersionExpiration": { "NoncurrentDays": 365 }
}
]
}
Applying Lifecycle Configuration
aws s3api put-bucket-lifecycle-configuration \
--bucket my-bucket \
--lifecycle-configuration file://lifecycle.json \
--endpoint-url https://storage.yourdomain.com
Glacier Retrieval
Objects in Glacier require a restore before download. Initiate a restore request; when ready, the object is temporarily available for download.
Restore request (if supported by your deployment):
aws s3api restore-object \
--bucket my-bucket \
--key archives/old-backup.tar.gz \
--restore-request '{"Days": 7}' \
--endpoint-url https://storage.yourdomain.com
After the restore completes (check object metadata or wait for the configured days), download normally. The restored copy may expire after the specified period.
Cost Optimization Tips
- Use lifecycle rules — Automate transitions; don’t manually move objects
- Prefix-based rules — Apply different policies to different paths (e.g.,
uploads/vsarchives/) - Review access patterns — If data is rarely read, move to STANDARD_IA or GLACIER sooner
- Versioning + lifecycle — Transition old versions to cheaper classes; expire delete markers
- Delete what you don’t need — Use expiration rules to remove temporary or obsolete data
Next Steps
- Managing Buckets — Configure lifecycle rules
- Object Versioning — Version lifecycle and noncurrent transitions
- Working with Objects — Upload with storage class