title: How to limit user uploads in S3
body: <p>I'm writing an application which will run on AWS. It contains user uploads like images and videos and I want to store that data in S3. I'm wondering how to prevent one user uploading gigabytes of data as I will pay for it. I can:</p>
  
  <ul>
  <li>limit single file upload size (let's say 50MB, as videos are allowed)</li>
  <li>limit amount of file uploads (let's say 1000, just an arbitrary number)</li>
  </ul>
  
  <p>But if someone wants, he could make several accounts and fill my storage with trash. I can also check my bucket size, before every upload, and only upload if my bucket volume &lt; 50GB for example. But these computations are very expensive for some simple uploads.</p>
  
  <p>Should I change to another storage service where I can put a limit? 
  Or is there a common way to solve my issue?
  Or should I just trust my users?</p>