title: How to check which files are not set to "Standard" storage class on amazon S3 bucket
body: <p>When using Amazon AWS service S3, is there an easy way to check if ALL files in a bucket has its storage class set to "Standard"?</p>
  
  <p>If any files is set to either "Standard - Infrequent Access" or "Reduced Redundancy" i would like a list with all those files, so i can change their storage class to "Standard".</p>
  
  <p>--------EDIT---------</p>
  
  <p>I have created an AWS CLI command, that can do the above. It is as follows:</p>
  
  <pre><code>aws s3api list-objects --bucket myBucketName --query 'Contents[?StorageClass != `STANDARD`][].{Key:Key}'
  </code></pre>
  
  <p>(STANDARD should be surrounded with ` but they dont show for some reason.)</p>
  
  <p>But it made me think about, what this kind of request will cost on a very large bucket with millions of files. If the line above returns 5 files, would i then be charged for 5 requests, or would i be charged for every single file that is accessed in the search?</p>