Skip to content
Cloudbeginner

What is object storage?

Updated Nov 30, 20263 min readBased on official documentation
What is object storage?

In short

Object storage is a way to keep files, called objects, in a flat pool of containers rather than in folders on a disk. Each object holds the data plus descriptive details called metadata, and you reach it by a unique key. Cloud providers such as Amazon S3 offer it as a service.

The basic idea

Object storage keeps data as objects. An object is a file together with metadata, which is extra information that describes the file, such as its size, type, and when it was created. Each object lives inside a container, often called a bucket, and gets a name, or key, that you use to find it again.

This is different from the disk drives on your laptop, where files sit inside folders inside other folders. Object storage does not depend on a fixed folder tree. You store a file, give it a key, and fetch it later with that key. Because the system does not need to know where a disk block sits, it can grow very large without you managing hardware.

How it works

You usually talk to object storage over the internet using an API, which is a set of web requests your code sends. The common actions are simple: upload an object, download an object, read its metadata, and delete it. The Amazon S3 documentation describes its data as objects stored within buckets, where each bucket is a container for objects.

The service handles copies of your data behind the scenes. Amazon S3, for example, is built to keep data available and to scale to any amount you store. You do not need to plan disk sizes in advance.

Access is private by default in Amazon S3. Only the resources you create can be reached, and you grant more access through permission rules. Those rules can be set on a whole bucket or on individual objects.

When to use it

Object storage fits data that is written once or changes rarely and is read by many programs. Typical examples include:

  • Images and videos for a website or mobile app
  • Backups and archives
  • Logs and data files for analytics
  • Static website files such as HTML, CSS, and JavaScript

Amazon S3 also offers storage classes, which trade price against how quickly data can be read. Frequently used data can stay in a standard class, while rarely read data can move to cheaper archive classes. Lifecycle rules can move or delete objects automatically as they age.

A simple example

Here is a short command-line example using the AWS CLI to copy a local file into a bucket and list what is stored there:

aws s3 cp photo.jpg s3://my-example-bucket/photos/photo.jpg

aws s3 ls s3://my-example-bucket/photos/

The first command uploads the file under the key photos/photo.jpg. The slashes in the key only look like folders; S3 stores the whole string as one name. The second command lists keys that start with that prefix.

Common mistakes

A frequent mistake is assuming object storage works like a normal file system. You cannot edit one line of an object in place. You replace the whole object, so it suits files that are written whole. Another mistake is making buckets public by accident. Amazon S3 enables Block Public Access by default at the bucket level, and the documentation recommends keeping those settings on unless you have a clear reason to change them.

It also helps to remember that consistency matters when several programs write the same key. Amazon S3 provides strong read-after-write consistency for PUT and DELETE requests, so a read after a successful write returns the latest data.

Alternatives

Object storage is not the only option. Block storage presents a raw disk to a server and suits databases that need fast small updates. File storage offers a shared folder tree that several machines mount at once. If you need a relational database, see our guide to databases, and for servers that run your code, see our page on virtual machines. Choose object storage when you need cheap, large, and durable storage reached over the network.

FAQ

Is object storage the same as a file system?

No. A file system organizes files in nested folders on a disk. Object storage keeps each file as an object with its own key and metadata, in a flat set of buckets.

Can I change part of an object after I upload it?

Generally no. You upload a new version of the whole object to replace it. This is why object storage works best for files that are written once or rarely changed.

Is data in Amazon S3 public by default?

No. Buckets and objects are private by default, and only the resources you create can access them. You grant wider access with permission policies.

How do I pick a storage class?

Pick based on how often you read the data. Frequently used data fits the standard classes, while rarely accessed data can move to cheaper archive classes to save cost.

Sources

This page is based on the official documentation below. Read it for full detail.

Object storage — official documentation ↗
blozhikDeveloper news from across the web, explained. Every story links to its original sources.