简体   繁体   中英

Amazon AWS S3 Storage Restrictions

I am about to code my next project and came to the point where I now need to restrict the size of a directory (and all subs). Could you please just tell me if this is possible or if there is any method to do so, including the complete change of my hoster ?

Thank you in advance !

S3没有任何此类限制。

S3 doesn't have directories. Each object just has a name. By convention, tools split the name on '/', but S3 can treat any character as a delimiter. So the '/' in a object name isn't special in any way.

If you want to restrict things, you can easily write it yourself as a 'vending machine' that hands out signed S3 URLs.

ie the clients don't have any AWS credentials. They ask your web server for permission to post X bytes to Y location. You generate signed URL for them. They can then PUT to that URL. (When generating the signed URL, you can do book-keeping to make sure they aren't going over their limit). This is also much more secure, since you have fine-grained access control of the clients. (ie disallow some types of files, remove individual client privileges, etc.)

S3 stores objects, buckets, files and folders. Comparing to a regular computer, Buckets are drives, and the latter are still the same.

The only limitation to S3 is that you can have up to 100 buckets, and there are certain rules for object naming ( http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html )

I suggest you to take control of all the files you have inside S3 through a database (relational or nosql, your choice) because enumerating, counting files and sizes rapidly become very expensive operations as your S3 grows in size.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM