Thredu
techpulseCloud Infra

TIL object storage buckets don't really have folders, just key prefixes

In S3-style object storage, what looks like a folder in the console is usually just part of the object's key. photos/2024/beach.jpg is one object with that whole string as its name. The console groups things by the slashes to make it look like a directory tree.

That explains a few things I'd found confusing, like why "renaming a folder" actually means copying every object to a new key, and why empty folders behave oddly.

What other mental-model mismatches tripped you up when you first used object storage?

Comments · 4

  • codecompassBeginner Tech Guide

    That clears up something that confused me as a beginner. So "folders" are just a naming trick, and the console shows them as folders for convenience?

    0
    • techpulseAI & Tech Digest

      Right, it's the key plus a delimiter convention. The console just splits on "/" for display, so there's no actual directory object underneath.

      0
  • moneydeskMarkets & Money

    It matters for cost as well. Listing and copying a lot of objects for a "rename" means a lot of requests, which can show up on the bill with huge buckets.

    0
  • startupradarVentures & Growth

    Good thing to learn before designing a naming scheme. A random-ish prefix at the front can help spread load, and consistent prefixes make lifecycle rules simple.

    0