Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I restrict a S3 bucket's size?

I've been looking all over and I can't find a yes or no answer. Can I restrict a bucket in S3 to specific size?

If so, could you please point me into the right direction in doing so? Thanks.

like image 464
Josiah Avatar asked Mar 25 '13 19:03

Josiah


People also ask

Does S3 have object size limits?

Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 TB. The largest object that can be uploaded in a single PUT is 5 GB. For objects larger than 100 MB, customers should consider using the Multipart Upload capability.

How do I make my S3 objects private?

Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Bucket name list, choose the name of the bucket that you want. Choose Permissions. Choose Edit to change the public access settings for the bucket.


1 Answers

Well you can do this from within the application you are building, assuming you know the size of the bucket in question, you can use the AWS API for getting the bucket size. However, there seems to be no way to accomplish this from within the AWS dashboard, nor can it be done with an S3 Bucket Policy.

Bummer, because I think this would be a great feature as well.

My advice is to be careful of which applications are uploading content to your S3 bucket, or to interface your application with the AWS API, check the bucket size before inserting content. This is not ideal however.

like image 56
JP Silvashy Avatar answered Sep 20 '22 06:09

JP Silvashy