Object storage is durable, cheap and effectively unlimited, which makes it the default home for uploads, backups, artifacts and static assets. Its simplicity is also why buckets tend to become landfill.
Separate buckets by purpose and lifecycle
- Public assets served to browsers.
- Private user uploads.
- Backups and database dumps.
- Build artifacts and container layers.
- Logs and exported telemetry.
Each has different access rules, retention needs and cost profiles. Mixing them into one bucket means the strictest policy has to apply to everything, or the loosest does.
Key naming decides your future options
Object keys are effectively permanent once things reference them. A hierarchical scheme that includes the entity and a date makes lifecycle rules and selective deletion straightforward, and makes listing efficient.
| Choice | Consequence |
|---|---|
| Include a date prefix | Lifecycle rules and pruning become trivial. |
| Include the owning entity | Selective deletion for a user or tenant is possible. |
| Use opaque identifiers, not user input | Avoids collisions and traversal surprises. |
| Keep extensions accurate | Content type served correctly to browsers. |
| Avoid embedding mutable metadata | Renaming an object means copying it. |
Serve private content with signed URLs
Making a bucket public to avoid handling authorisation is the classic mistake. Generate time-limited signed URLs for private objects instead: the storage layer stays closed, the application decides who may read what, and links expire on their own.
Lifecycle rules are not optional
- Move objects to colder storage classes after a defined period.
- Expire temporary artifacts automatically rather than hoping someone tidies up.
- Set a retention floor for anything with a compliance obligation.
- Expire incomplete multipart uploads; they are invisible and still billed.
- Version critical buckets, but expire old versions or they accumulate forever.
Summary
One bucket per purpose, thoughtful keys, signed URLs for anything private, and lifecycle rules from the beginning. These decisions are cheap now and expensive to retrofit once millions of objects reference the old scheme.