Skip to content
Home
Cloud Storage: Object, Block, and File Options Compared

Cloud Storage: Object, Block, and File Options Compared

Cloud Computing Cloud Computing 7 min read 1372 words Beginner ExcellentWiki Editorial Team

Cloud storage comes in three primary formats — object, block, and file — each optimized for different access patterns, performance requirements, and cost profiles. Choosing the wrong storage type leads to excessive costs, poor application performance, or architectural complexity. According to the 2024 NetApp Cloud Storage Report, organizations using multiple storage types optimized to workload requirements reduce total storage costs by an average of 38% compared to single-type strategies.

Object Storage

Object storage treats data as discrete objects — a file, its metadata, and a globally unique identifier — stored in a flat namespace (buckets). Objects are accessed via HTTP/HTTPS APIs (RESTful), not by mounting as a filesystem. Amazon S3, Google Cloud Storage, and Azure Blob Storage are the leading object storage services.

Durability and availability: Object storage achieves 99.999999999% (11 nines) durability by automatically replicating objects across multiple devices and facilities. Data is checksummed and repaired automatically — if a drive fails, data is re-replicated from surviving copies. AWS S3 Standard provides 99.99% availability; the One Zone-IA variant offers 99.5% at lower cost.

Best use cases:

  • Static web assets (HTML, CSS, JavaScript, images, videos)
  • Backup and archival data
  • Data lake storage for analytics (Parquet, Avro, CSV files)
  • User-generated content (photos, documents, uploads)
  • Log storage and event archives

S3 storage classes by access pattern:

ClassRetrievalCost vs Standard
S3 StandardInstant1x
S3 Intelligent-TieringInstant~0.9x (auto-optimizes)
S3 Standard-IAInstant~0.5x
S3 One Zone-IAInstant~0.4x
S3 Glacier Instant RetrievalInstant~0.25x
S3 Glacier Flexible Retrieval1-5 min~0.1x
S3 Glacier Deep Archive12 hours~0.04x

Lifecycle policies automate transitions between classes — move objects to Standard-IA after 30 days, Glacier after 90, and Glacier Deep Archive after 365:

aws s3api put-bucket-lifecycle-configuration \
  --bucket excellentwiki-logs \
  --lifecycle-configuration '{
    "Rules": [{
      "Id": "archive-rule",
      "Status": "Enabled",
      "Filter": {"Prefix": ""},
      "Transitions": [
        {"Days": 30, "StorageClass": "STANDARD_IA"},
        {"Days": 90, "StorageClass": "GLACIER"}
      ],
      "Expiration": {"Days": 365}
    }]
  }'

S3 versioning preserves every object version, protecting against accidental deletion. When combined with Object Lock (write-once-read-many), versioning provides immutable data storage for compliance with SEC Rule 17a-4 and FINRA regulations.

Block Storage

Block storage provides raw, formatted storage volumes attached to virtual machines. Like a virtual hard drive, block storage presents as a device (/dev/sdf) that the OS formats with a filesystem (ext4, XFS, NTFS). AWS EBS, GCP Persistent Disk, and Azure Managed Disks are the primary block storage services.

Performance characteristics:

  • Lowest latency — direct NVMe attachment via AWS Nitro or GCP Persistent Disk
  • Predictable throughput — IOPS and throughput scale with volume size and type (gp3, io2, st1)
  • Replication — automatically replicated within an availability zone; snapshots for cross-region recovery

Best use cases:

  • Operating system boot volumes
  • Database storage (PostgreSQL, MySQL, MongoDB, SQL Server)
  • Application data requiring low latency and frequent writes
  • Workloads that need filesystem semantics

EBS volume types:

  • gp3 (general purpose SSD) — baseline 3,000 IOPS, 125 MB/s, burstable to 16,000 IOPS. Best price-performance for most workloads.
  • io2 Block Express (provisioned IOPS SSD) — up to 256,000 IOPS, 99.999% durability. For mission-critical databases.
  • st1 (throughput optimized HDD) — 500 MB/s throughput. For big data and logging.
  • sc1 (cold HDD) — lowest cost, for infrequent data access.
aws ec2 create-volume \
  --volume-type gp3 \
  --size 200 \
  --iops 5000 \
  --throughput 250 \
  --availability-zone us-east-1a \
  --encrypted \
  --kms-key-id alias/ebs-key

File Storage

File storage provides shared filesystems accessible by multiple compute instances via NFS (Linux) or SMB (Windows). AWS EFS, GCP Filestore, and Azure Files are the primary file storage services.

Key properties:

  • Shared access — multiple instances read and write the same files concurrently
  • POSIX-compliant — standard file permissions, locking, and directory structure
  • Elastic capacity — grow and shrink automatically without provisioning (EFS)

Best use cases:

  • Home directories and user profiles
  • Content management systems needing shared storage
  • Media rendering farms (shared asset libraries)
  • Legacy applications with NFS/SMB dependencies
  • Container storage across Kubernetes Pods (read-write-many PVC)
# Create EFS file system
aws efs create-file-system \
  --creation-token excellentwiki-fs \
  --performance-mode generalPurpose \
  --throughput-mode elastic \
  --encrypted

# Mount on EC2
sudo mount -t nfs4 -o nfsvers=4.1 \
  fs-12345678.efs.us-east-1.amazonaws.com:/ /mnt/efs

Cold and Archive Storage

For data that is rarely accessed but must be retained for compliance or business reasons, cold storage provides the lowest cost per GB:

ServiceRetrieval TimeMin Storage DurationCost/GB/month
S3 Glacier Deep Archive12-48 hours180 days~$0.001
Azure Blob Archive1-15 hours180 days~$0.002
GCP Archive Storage30-365 days365 days~$0.0012

Cold storage is ideal for financial records, healthcare data (HIPAA retention), security logs, scientific research data, and media archives.

Storage Comparison Summary

FeatureObject (S3)Block (EBS)File (EFS)
Access methodHTTP APIOS block deviceNFS/SMB mount
Max single-object/file size5 TB16 TB per volumeUnlimited
Latency50-200ms<5ms5-20ms
Throughput100+ Gbps256,000 IOPS10+ GB/s
Shared accessYes (read)No (single instance)Yes (many instances)
PricingPer GB + requestsPer GB provisionedPer GB used
Durability11 nines99.999%11 nines

Security and Compliance for Stored Data

Cloud storage security requires defense in depth. Enable server-side encryption on all storage buckets: SSE-S3 (AES-256) for S3, Google-managed encryption for Cloud Storage, and Azure Storage Service Encryption — all enabled by default. For regulated workloads, use customer-managed keys (SSE-KMS, Cloud KMS, Azure Key Vault) with automatic key rotation.

Access control best practices:

  • Use IAM policies for broad access control (e.g., all users in an account can list a bucket)
  • Use bucket policies (S3) or ACLs for cross-account access
  • Use pre-signed URLs for time-limited access to specific objects
  • Enable VPC endpoints (Gateway Endpoint for S3, Private Service Connect for Cloud Storage) to keep storage traffic within the provider’s network

Object Lock and retention policies: S3 Object Lock and Azure Blob Immutable Storage enforce WORM (Write Once, Read Many) policies. Use them for legal hold, regulatory compliance (SEC 17a-4, FINRA), and ransomware protection. Cloud Storage Bucket Lock provides similar immutability guarantees.

Logging and monitoring: Enable S3 server access logs or CloudTrail data events, GCP Cloud Audit Logs for Cloud Storage, and Azure Storage analytics logs. Send these to a SIEM for anomaly detection. Configure alerts for mass deletion events, public bucket visibility changes, and cross-region data replication activities.

Data Transfer and Migration

Moving large datasets between on-premises and cloud requires planning:

  • Online transfer — AWS DataSync (aws datasync), GCP Storage Transfer Service, Azure AzCopy. Optimized for network throughput with parallel connections and incremental sync.
  • Offline transfer — AWS Snowball (80 TB appliance), GCP Transfer Appliance (100 TB), Azure Data Box (100 TB). Physical shipping for petabyte-scale migrations. Snowmobile (100 PB shipping container) for exabyte-scale.

For ongoing synchronization between cloud regions or providers, use tools like Rclone (open-source, supports 40+ providers) with checksum verification and bandwidth throttling.

FAQ

Which cloud storage type is cheapest? For active data, S3 Standard-IA or Azure Blob Cool tier provides the best balance of cost and performance. For archival data, S3 Glacier Deep Archive or GCP Archive Storage at ~$0.001/GB/month is cheapest. Block storage (EBS) is typically 20-50x more expensive per GB than object storage — only use it when low latency is required.

Can I use S3 as a database? Not for transactional workloads requiring writes, consistency, and complex queries. S3 is excellent for reading large objects, storing analytics data, and serving static assets. For database use, use S3 as the storage layer for data lakes with query engines like Athena, Redshift Spectrum, or Trino.

What is the difference between S3 and EBS snapshots? S3 stores objects at REST API level. EBS snapshots capture point-in-time images of block volumes and store them in S3 internally. EBS snapshots are incremental (only changed blocks), support cross-region copying, and can restore volumes to any size.

How do I ensure data durability in the cloud? Enable versioning on object storage, configure cross-region replication for disaster recovery, implement lifecycle policies for automated backups, and test backup restoration quarterly. For block storage, schedule automated EBS snapshots and copy them to another region.

What is S3 Object Lock and when should I use it? Object Lock enforces WORM (Write Once, Read Many) policies on S3 objects. Use it for compliance retention (SEC, FINRA, GDPR), preventing ransomware from deleting or modifying data, and protecting audit logs from tampering.

AWS Getting Started GuideCloud Databases GuideCloud Cost Optimization

Section: Cloud Computing 1372 words 7 min read Beginner 756 articles in section Report inaccuracy Back to top