Is there a possibility to set maximum file (object) size using a bucket’s policy?
I found here a question like this, but there is no size limitation in the examples.
Is there a possibility to set maximum file (object) size using a bucket’s policy?
Share
No, you can’t do this with a bucket policy. Check the Element Descriptions page of the S3 documentation for an exhaustive list of the things you can do in a bucket policy.
However, you can specify a
content-length-rangerestriction within a Browser Uploads policy document. This feature is commonly used for giving untrusted users write access to specific keys within an S3 bucket you control (e.g. user-facing media uploads), and it provides the appropriate tools for limiting the location, size, and data types that can be uploaded without needing to expose your S3 credentials.