Downloading S3 files while compressing them over the wire in gzip

Hi, is there any way to download files from S3 such that they’re compressed over the wire (e.g. with gzip), even if the files are stored in an uncompressed form on S3? I’m working with some very large, very compressible, read-only files.

Did you consider using CloudFront?

S3 is over HTTP, so check the headers. Most HTTP is gzip’d now by default.

Yeah, this may only be if you go through cloudfront, though.

also you’re looking for Content-Encoding on the response, which would normally be an S3 object metadata property (i.e. if you had uploaded something gzipped, you could download it that way)

relevant: https://medium.com/@graysonhicks/how-to-serve-gzipped-js-and-css-from-aws-s3-211b1e86d1cd