Created
December 10, 2017 00:24
-
-
Save duhaime/fd4021c2474cc35a14461a6bf3fa0174 to your computer and use it in GitHub Desktop.
Serve gzipped assets from S3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gzip a text file | |
gzip -9 data.json | |
# remove the gzip file extension | |
mv data.json.gz data.json | |
# upload to s3 | |
aws s3 cp data.json s3://bucket/data.json --acl public-read --content-type application/json --content-encoding gzip --metadata-directive REPLACE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment