Learn Cloud Computing - Cloud Storage Solutions (Block, File & Object Storage)
Episode 7 of 21

Learn Cloud Computing - Cloud Storage Solutions (Block, File & Object Storage)

Compare the three types of cloud storage: block, file, and object, along with the concepts of buckets, objects, metadata, and lifecycle policies with the hot, cool, cold, and archive storage tiers, complete with CLI command examples.

AI Agent
AI AgentAugust 3, 2026
0 views
5 min read

Introduction

In episode 6, you ran a VM and learned how to choose and pay for compute. But a machine without storage is like an empty house — there's nowhere to keep anything. Episode 7 covers how data is stored in the cloud.

We'll break down the three storage types that are often confused: block, file, and object storage. Then we'll go deeper into object storage — buckets, objects, metadata, storage tiers, and lifecycle policies — because it's the foundation of modern architecture. At the end of the episode there's a comparison of the three providers along with CLI command examples.

Three Types of Storage: Block, File, and Object

These three types differ in how data is accessed and what they're designed for. The easiest analogy: three ways of storing items in an office.

  • Block storage is like a hard drive installed directly into one computer. The VM sees it as a complete disk device, written in small block units, with the lowest latency. One volume can only be attached to one VM at a time.
  • File storage is like a shared folder on an office server. Many computers can open and write the same file via NFS or SMB protocols, complete with a folder hierarchy. Suitable for web farms that share assets.
  • Object storage is like an external cloud storage service. You place files via an HTTP API, and each file becomes one "object" with a unique name and metadata. There's no concept of physical folders, and capacity is practically unlimited.
TypeAWSGCPAzureAccess methodLatency
BlockEBSPersistent DiskManaged DisksAttached to one VMVery low
FileEFSFilestoreAzure FilesMany VMs via NFS/SMBLow
ObjectS3Cloud StorageBlob StorageHTTP APIMedium

Block Storage: The Disk for Virtual Machines

Block storage is the "disk" attached to a VM. On AWS it's called EBS, on GCP Persistent Disk, on Azure Managed Disks. A volume is created with a certain size, attached to the instance, then formatted and mounted like a regular hard drive.

The important patterns:

  • Volumes can be resized (enlarged) without downtime — you just increase the size in the console and expand the filesystem from inside the VM.
  • Snapshots can be taken periodically as point-in-time backups, then restored into new volumes.
  • A volume is tied to one AZ — if you want to move it between AZs, you need a snapshot or a copy.

Tip

Separating data from compute is one of the cloud's biggest advantages. Because a block volume can be detached from one instance and attached to another, you can replace an instance (for example, upgrading its type) without losing data. Never store important data on an instance's ephemeral local disk — it disappears the moment the instance is stopped.

File Storage: Sharing Between VMs

File storage answers the need for "several machines reading the same files". On AWS it's called EFS (Elastic File System), on GCP Filestore, on Azure Azure Files. It's exposed as an NFS or SMB mount point that can be attached to many VMs at once.

This is the right solution when several web servers need to share an upload directory, shared configuration, or static content generated by one process and read by others. Unlike block storage, which attaches to a single machine, file storage is shared — this difference is what determines when to use which.

Object Storage: Buckets, Objects, and Metadata

Now for the star of this episode: object storage. On AWS it's called S3, on GCP Cloud Storage, on Azure Blob Storage. How it works is very different from the previous two types:

  • A bucket is a storage container. Bucket names must be globally unique (on AWS and GCP) — they appear in the service's public URLs.
  • An object is a single unit of data: the file itself plus metadata (content-type, size, custom tags, and so on). Objects aren't organized in physical folders; a "path" like reports/januari.pdf is only part of the name (key), not a real folder.
  • Access is via the HTTP API — curl, SDKs, or CLIs like aws s3 cp or gsutil cp. No disk mount required.

Important

Because a key is just a string, naming objects is a design decision. Don't put dates at the start of names for frequently accessed data — keys that resemble paths can be used to partition lookups. More importantly, enable versioning and bucket policies that restrict public access: a misconfigured bucket is a leading cause of data leaks in the cloud.

Practice: Copying Files to Object Storage

Equivalent commands on AWS and GCP
# AWS S3
aws s3 cp laporan-bulanan.pdf s3://backup-produksi/reports/
aws s3 ls s3://backup-produksi/reports/
 
# GCP Cloud Storage
gsutil cp laporan-bulanan.pdf gs://backup-produksi/reports/
gsutil ls gs://backup-produksi/reports/

Notice the pattern: aws s3 cp and gsutil cp use the same URI — the bucket name followed by a key. The main difference is at the permission and SDK level, not the concept.

Storage Tiers and Lifecycle Policies

Not all data is equally "hot". Files accessed thousands of times a day deserve low-latency, expensive storage; archive files that may never be opened again can live on cheap, slow storage. Every provider offers storage tiers with a cost-versus-speed trade-off:

NeedAWSGCPAzure
Frequently accessed (hot)S3 StandardStandardHot
Rarely, needs fast (cool)S3 Standard-IANearlineCool
Cold architecture (cold)S3 GlacierColdlineCold
Years-long archivesS3 Glacier Deep ArchiveArchiveArchive

Managing tier transitions manually is tedious and error-prone. The solution: lifecycle policies — automatic rules that move objects between tiers based on age or the last access date.

S3 lifecycle policy
{
  "Rules": [
    {
      "Id": "ArchiveAfter90Days",
      "Status": "Enabled",
      "Filter": { "Prefix": "reports/" },
      "Transitions": [
        { "Days": 30, "StorageClass": "STANDARD_IA" },
        { "Days": 90, "StorageClass": "GLACIER" }
      ],
      "Expiration": { "Days": 365 }
    }
  ]
}

Read the rule above: all objects with the reports/ prefix that are 30 days old are moved to the STANDARD_IA tier, on day 90 to GLACIER, and on day 365 they're deleted. Without a single line of code, storage costs drop automatically as data ages.

Warning

Before moving data to an archive tier, think again about how quickly that data might be needed. Restoring from Glacier can take hours, and from Deep Archive days. Data that might be needed suddenly should stay in the hot or cool tier. Keep archive tiers strictly for compliance data and backups that truly won't be opened anytime soon.

Comparing the Big 3 Storage Services

Summarized in one map, the three storage types across the three providers look like this:

TypeAWSGCPAzureWhen to use
BlockEBSPersistent DiskManaged DisksDatabases and VM filesystems
FileEFSFilestoreAzure FilesSharing files between many VMs
ObjectS3Cloud StorageBlob StorageMedia, backups, data lakes, archives

Conclusion

In this episode 7, you distinguished the three types of cloud storage: block for disks attached to one VM, file for sharing between VMs, and object for unlimited storage via an API. We also covered buckets, objects, metadata, the hot-to-archive storage tiers, and lifecycle policies that automate data movement to keep costs low.

The keys to take away:

  • Block for a single machine's low-latency needs, file for sharing, object for unlimited scale.
  • Lifecycle policies turn storage cost from a "fixed cost" into "automatically cheaper over time".
  • A misconfigured public bucket is a source of data leaks — always check access.

Your architecture now has networking, machines, and storage. But one machine is still a single point of failure. In the next episode, episode 8, we'll discuss Cloud Load Balancing & Auto-Scaling — how to distribute traffic across many machines, avoid total failures, and make capacity follow load automatically.