title: AWS find max file size in S3 bucket
body: <p>I want to find the size and name of the biggest file in my S3 bucket.</p>
  
  <p>Currently I have:</p>
  
  <pre><code>aws s3api list-objects --bucket bucket-name --output json --query "[max(Contents[].Size), length(Contents[])]"
  </code></pre>
  
  <p>which does not allow me to see the name of the file.</p>
  
  <p>I also have the command to list the details of all files on the bucket:</p>
  
  <pre><code>aws s3api list-object-versions --bucket bucket-name --query 'Versions[*].Size'
  </code></pre>
  
  <p>What command will give me the name and size of the largest file(s) on the S3 bucket? </p>