Use Many S3 Buckets

use many s3 buckets

Should applications use one S3 bucket, putting different categories of files under different directories?1 Or should an application use multiple S3 buckets — one for each different category of files?

As the title implies, the answer is many S3 buckets. While some things, like lifecycle rules, can be configured based on directories (key prefixes, really), many other things cannot. The default canned ACL is bucket-wide. Cross-Origin Resource Sharing configuration is bucket wide as well. So are bucket policies.

S3 buckets themselves cost nothing — only storage and requests are charged. Use many buckets and tune each one to the application and file category demands.

1. S3 doesn’t really have directories, but object keys can have slashes in them. The directory itself never exists on S3, users can filter based on those prefixes and such.

Posted in S3