simPod
simPod

Reputation: 13486

S3 what is recommended hierarchy for storing objects?

I've been playing around with Amazon S3 and I wonder why would I need to use multiple buckets. I just though I would name my objects according to hierarchy they belong to, eg. blog/articles/2016/08/article-title.jpg and store them all in one bucket. The folders will be created in this case. Or is there any reason why would I need multiple buckets to store uploaded files?

And if so, what is the proper design of having multiple buckets? Let's say I need to categorise files by type year and month. I suppose I can't have buckets in a bucket.

Upvotes: 1

Views: 1988

Answers (1)

Rodrigo Murillo
Rodrigo Murillo

Reputation: 13638

AWS guidance in S3 Bucket Restrictions and Limitations states:

There is no limit to the number of objects that can be stored in a bucket and no difference in performance whether you use many buckets or just a few. You can store all of your objects in a single bucket, or you can organize them across several buckets.

I would keep it simple, and store that type of asset data in a single bucket, perhaps divided up into a few 'top level' key name prefixes (folders) such as images, scripts, etc.

Upvotes: 4

Related Questions