Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Max files per directory on Amazon S3

Tags:

amazon-s3

I'm currently storing ~3 million images files in a single directory on my server, which is causing serious performance issues. I'd like to move them to Amazon S3 and I'm wondering whether I'd need to use a hierarchical folder structure or whether I can store them in a single folder on S3.

I get a large percentage of my traffic from google image search and I don't want to hurt my SEO by changing the image path, so a single folder on S3 would be ideal if there aren't any performance issues. I imagine LIST operations would be slow, but I'm okay with that.

like image 678
makeee Avatar asked Mar 10 '11 19:03

makeee


1 Answers

S3 has no limit on the number of items stored in a bucket. In fact, using a 'directory' separator in key names is completely optional.

There is a practical use for using a separator in your key: as you correctly guessed listing the keys will be more difficult as you'll have to page though many list results.

However, as the S3 documentation points out you can use any character as a separator.

like image 67
Uriah Carpenter Avatar answered Oct 17 '22 11:10

Uriah Carpenter