G
G
gromopetr2017-01-21 13:04:38
Amazon Web Services
gromopetr, 2017-01-21 13:04:38

How to properly store images on amazon s3?

How is it better / more correct to organize the storage of a large amount of images on s3 for the fastest access to them by url?
Put it in subfolders like that /buket/c4c/a42/38a0b923820dcc509a6f75849b.jpg
or for s3 there is no difference and you can put everything in the root - /buket/38a0b923820dcc509a6f75849b.jpg ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaliy Orlov, 2017-01-21
@orlov0562

for s3 there is no difference and you can put everything in the root

R
Roman Mirilaczvili, 2017-01-21
@2ord

Correct "bu c ket", not "buket".
The logical volume of a disk is analogous to a bouquet in S3. Therefore, files are not simply placed in the root of the volume. It's better to put all the files in some "ProgX" folder. For S3, the nesting level of folders does not matter, because it's just a path to a file. Folder splitting is needed only when you need to emulate a tree hierarchy like on disks.
If the path data for all required files is available in advance (the path data is stored in the application's DBMS), i.e. it is not required to search the entire bouquet using "list objects", then you can put it in the root of the "ProgX" folder:
ProgX / c4ca4238a0b923820dcc509a6f75849b.jpg
NB
If data needs to be served to web clients, then it is faster to serve it with a caching content server, Amazon CloudFront.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question