
TL;DR
|
Object storage is a way of storing files as self-contained objects, each with a unique name, in a large pool called a bucket. Instead of opening a file on a disk, your app asks the storage service for an object by its name, over a web API.
It's how many apps store user uploads, media libraries, backups, and generated files, because it grows without limits you have to manage and works the same way from any server. This guide explains how object storage differs from disk storage, what "S3-compatible" means, and when to use it.
Key takeaway: disks store blocks, shared file systems store files in folders, and object storage stores objects in buckets reached through an API.
| Block storage | File storage | Object storage | |
|---|---|---|---|
| What it is | A disk attached to one server | A shared network drive with folders | A bucket of objects reached over an API |
| How you use it | Through the operating system, like any disk | Through files and folders, from several servers | With API requests, such as upload, download, and delete |
| Good for | Databases and the operating system | Files several servers read and edit | Large and growing collections of files |
| Grows by | Resizing the disk | Resizing the share | Adding objects, up to the bucket's capacity |
Key takeaway: you store and fetch whole objects by their key, and folders are just a naming convention.
| Term | Meaning |
|---|---|
| Bucket | A container for objects, like a top-level storage area |
| Object | One stored item: its data, plus metadata such as its type and size |
| Key | The object's unique name within the bucket, such as invoices/2026/10/1234.pdf |
| Prefix | The start of a key, such as invoices/2026/. Tools show prefixes as folders, but there are no real folders |
Apps use a small set of operations: put an object, get an object, delete an object, and list objects that start with a prefix. Objects are written whole. To change one, you upload a new version of the entire object.
Key takeaway: Amazon S3's API became the common language of object storage, so S3-compatible services work with the same tools and code.
Amazon S3 was one of the first widely used object storage services, and its API, the set of requests apps send to it, became a de facto standard. Many other providers offer services that understand the same requests.
For you, that means portability. The AWS code libraries for many programming languages, command-line tools such as the AWS CLI and rclone, and many app plugins all work with an S3-compatible service. You usually only change the address they connect to and the credentials they use.
Key takeaway: use object storage for files you store and fetch whole. Use a database or disk for data that changes in small pieces.
| Good fit | Poor fit |
|---|---|
| Files users upload, such as photos and documents | A database's own data files |
| Media libraries with images, audio, and video | Files edited in small pieces many times a second |
| Backups and data exports | Your app's code |
| Files your app generates, such as reports and invoices | Small amounts of files one server reads and writes, where a disk is simpler |
Object storage also helps when an app runs on several servers. A file saved to one server's disk is missing from the others, but every server can reach the same bucket. Our guide What is autoscaling? explains why that matters.
Key takeaway: many object storage problems come from treating it like a disk, or from careless access settings.
| Mistake | What happens | How to avoid it |
|---|---|---|
| Making a bucket public by accident | Private files can be found and downloaded by anyone | Keep buckets private and give access deliberately |
| Putting access keys in code | Keys end up in Git, where anyone with access can read them | Read credentials from environment variables. Our guide What is a .gitignore file? covers keeping secrets out of Git |
| Treating it like a disk | Renaming a "folder" means copying every object in it, and small edits mean re-uploading whole files | Design around whole objects and stable keys |
| Listing a huge bucket on every request | Pages slow down as the bucket grows | Store the keys you need in your database |
Key takeaway: Upsun Cloud includes S3-compatible object storage in the platform, connected to your app automatically and covered by your existing backups and invoice.
According to the Upsun docs, object storage on Upsun Cloud is an S3-compatible bucket attached to your app. Set a size, and Upsun Cloud creates the bucket and connects it. Turn it on in the Console, under Configure resources, or with one command:
upsun resources:set --object-storage myapp:524288| What to know | Details from the Upsun docs |
|---|---|
| Compatibility | Your existing S3 tools and SDKs work as they are |
| Connection details | Provided automatically as environment variables, such as OBJECT_STORAGE_HOST and OBJECT_STORAGE_ACCESS_KEY, through a relationship named object-storage |
| Sizes | From 512 GB to 10 TB, in steps of 512 GB. The command above takes the size in MB |
| Billing | On allocated capacity, not the amount stored, prorated hourly and shown on your existing Upsun invoice. Backup storage is billed separately. See the pricing page for rates |
| Backups | Backing up an environment includes the bucket's contents |
| Preview environments | Branching an environment clones the bucket along with the rest of its data |
| Trials | Object storage isn't available on trial projects |
| Removing it | Setting the size to 0 permanently deletes the bucket and everything in it on the next deployment, with no retention period |
Here's how a Python app might upload a file, using the connection details Upsun Cloud provides:
import os
import boto3
from botocore.config import Config
s3 = boto3.client(
"s3",
endpoint_url=f"{os.environ['OBJECT_STORAGE_SCHEME']}://{os.environ['OBJECT_STORAGE_HOST']}:{os.environ['OBJECT_STORAGE_PORT']}",
aws_access_key_id=os.environ["OBJECT_STORAGE_ACCESS_KEY"],
aws_secret_access_key=os.environ["OBJECT_STORAGE_SECRET_KEY"],
region_name=os.environ["OBJECT_STORAGE_REGION"],
config=Config(s3={"addressing_style": "path"}),
)
s3.upload_file("report.pdf", "myapp", "reports/2026/report.pdf")For a few files that one instance reads and writes through the file system, the docs suggest a mount is usually simpler. Object storage is the better fit for large or growing collections. Read more in our launch post.
You can deploy on Upsun Cloud free for 15 days, with no card needed. Note that object storage isn't included in trials, so you'll need a paid project to try it.
Block storage is a disk attached to a server, used through the operating system. Object storage is a pool of objects reached over a web API, from any server.
A container for objects in Amazon S3 or an S3-compatible service. Each bucket holds objects, each with its own unique key.
That a storage service understands the same API as Amazon S3, so the same tools and code libraries work with it.
Not in place. You upload a new version of the whole object, which replaces the old one.
Often, for large volumes, because it's designed for bulk storage. Compare the pricing for the amount you'll store, including backups and any request or transfer charges.
Yes. Plugins and modules for both can store media in S3-compatible storage instead of the local file system.