title: How do I download compressed content on a S3 drive as plain text?
body: <p>I have HTML data stored on a S3 bucket served as a static site which is stored in gzipped form.  Though I can access my S3 site correctly and the browser knows to uncompress it, I can't download it using AWS CLI because the raw data that gets downloaded remains gzipped (rather than decompressing after the download) even after being copied to disk and thus comes out garbled when opened via text editor or browser.</p>
  
  <p>I've tried to explicitly pass the content-encoding to convert the gzipped content on S3 to plain text but the file that gets downloaded still appears to have the gzipped bytes rather than the raw UTF-8.  Here is the command I've tried:</p>
  
  <pre><code>aws s3 cp s3://mys3bucket.com/index.html ./test.html --content-encoding "gzip" --content-type "text/html"
  </code></pre>