I'm setting up a photo sharing service and each user will be able to upload images to their account. Is it a good idea to have one Amazon S3 bucker per user or is it acceptable to have every users pictures in one 'master' bucket? (or maybe one bucket with a folder per user?)
The total volume of data and number of objects you can store are unlimited. Also the documentation states there is no performance difference between using a single bucket or multiple buckets so I guess both option 1 and 2 would be suitable for you.
Amazon S3 Buckets You can create up to 100 buckets in each of your AWS cloud accounts, with no limit on the number of objects you can store in a bucket. If needed, you can request up to 1,000 more buckets by submitting a service limit increase.
You definitely do not need a bucket for each user. Never mind the fact that it seems very unlikely that AWS support would approve a request to increase your account's default total bucket limit from 100 to 300,000,000. Also, initial bucket creation is not intended to be done aggressively or in real-time.
The AWS Free Tier, offered to new AWS customers, gives you 5 GB of storage in the AWS S3 Standard storage tier. This includes up to 2000 PUT, POST, COPY or LIST requests, 20,000 GET requests and 15 GB of outgoing data transfer per month for a year.
One bucket will do the trick, think of buckets as 'projects'. There's also a limit of 100 buckets per AWS account, if I remember correctly.
Just have a decent directory structure and you'll be fine. One folder per user sounds good. Maybe something like this?
bucket_name
user_images
user_1
user_2
user_n+1
other_stuff
more_stuff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With