Ten thousand photos a day
A delivery firm asks drivers to take a photo at every door. That is ten thousand photos a day.
The photos are kept for a year, in case a customer complains. They will not fit on a laptop, and a server’s disk would fill in a week. Where should they go?
By the end of this lesson
Note
I can choose object storage for files.
Key words
| Word | What it means | Example |
|---|---|---|
| Object storage | a service that keeps whole files | |
| Bucket | a named container for objects | acme-delivery-photos |
| Object | one stored file and its details | |
| Key | the full name of an object | photos/2026/10/order-1042.jpg |
| Prefix | the start of a key | photos/2026/ |
| Block storage | a disk for one server |
The cells students fill in are left blank in this preview.
A bucket holds objects by key
Object storage keeps whole files. You make a bucket, then put files into it. Each file is an object, and you find it by its key.
A key looks like a path with slashes. But there are no real folders. The slashes are just part of the name. The provider’s screens show each prefix as a folder, so it is easier to read.
What a bucket of delivery photos holds
| Key | Size | Uploaded |
|---|---|---|
| photos/2026/10/order-1042.jpg | 2 MB | 21 Oct, 09:14 |
| photos/2026/10/order-1043.jpg | 3 MB | 21 Oct, 09:20 |
| photos/2026/09/order-0977.jpg | 2 MB | 30 Sep, 17:02 |
| invoices/2026/10/order-1042.pdf | 80 KB | 21 Oct, 09:15 |
The cells students fill in are left blank in this preview.
Try it: a bucket as a dictionary
# A tiny pretend bucket: each key points to a file's contents.
bucket = {}
def put(key, data):
bucket[key] = data
def list_keys(prefix):
# Object storage lists the keys that start with a prefix.
found = []
for key in bucket:
if key.startswith(prefix):
found.append(key)
return found
put("photos/2026/10/order-1042.jpg", "photo bytes")
put("photos/2026/09/order-0977.jpg", "photo bytes")
put("invoices/2026/10/order-1042.pdf", "invoice bytes")
print(list_keys("photos/"))
print(list_keys("photos/2026/10/"))
# Put an invoice for order 1043, then list the prefix "invoices/".
Choose the storage that fits the job
There are three common places to keep data in the cloud.
Object storage suits whole files that are written once and read many times: photos, PDFs, backups, logs. It grows as far as you need.
Block storage is a disk for one server. It suits a program that changes small parts of a file all the time.
A database suits records you search and update, such as orders.
Worked example: where each thing goes
| Job | Best fit | Why |
|---|---|---|
| Drivers’ doorstep photos | Object storage | Whole files, kept a long time |
| Monthly payslip PDFs | Object storage | Written once, read now and then |
| The disk a server starts from | Block storage | The server changes it all the time |
| Customer orders and stock | A database | Records you search and update |
| Nightly backup files | Object storage | Large, and cheap to keep |
The cells students fill in are left blank in this preview.
A common mistake
Warning
Many people think a bucket is a disk, like the one in their laptop. You cannot change a few bytes in the middle of an object. You upload a new whole object instead. If a program edits a file all the time, give it block storage or a database.
You pay for what you keep and send
Object storage is priced in a few parts. You pay for each gigabyte you keep, each month. You pay a little for each request, such as an upload. You often pay for data sent out to the internet.
Old files that nobody opens can move to a cheaper, slower storage class (a price level for rarely used files). Many teams set a rule that does this after 90 days.
Worked example: a month of delivery photos
| Item | Amount | Example price | Cost |
|---|---|---|---|
| Photos kept | 300 GB | 2p per GB | £6.00 |
| Uploads | 300,000 | £1 per 100,000 requests | £3.00 |
| Data sent out | 10 GB | 5p per GB | £0.50 |
| Total | £9.50 |
The cells students fill in are left blank in this preview.