This is the first time I've been late with a solstice or equinox post. On the 21st of December at 10:44 UTC it was the start of Winter for the Northern hemisphere, Summer down south. Rendered in Catfood Earth (back dated to the right date and time... Windows, Android).
(Published to the Fediverse as:
Tam Pan #timelapse#4k#video 4k time-lapse from Mount Tamalpais in Marin County looking over the San Francisco bay area.)
(Published to the Fediverse as:
Rio Vista Bridge #photo#bridge Photo of The Helen Madere Memorial Rio Vista Bridge spanning The Sacramento River in California.)
(Published to the Fediverse as:
Pitcher Plant #photo#pitcher Photo of a Pitcher Plant at the Conservatory of Flowers, Golden Gate Park, San Francisco, California.)
(Published to the Fediverse as:
Unidentified Butterfly #photo#butterfly What is clearly a zebra longwing butterfly at the Conservatory of Flowers in the Golden Gate Park, San Francisco, California.)
By default compression doesn't work in CloudFront for a website backed by an Amaxon S3 bucket.
The first step is pretty obvious - switch on compression in CloudFront:
To get to this setting open you distribution, go to the Behaviors tab and edit your behavior(s). Scroll down to the bottom and toggle Compress Objects Automatically to On. Save and drum your fingers while the distribution updates.
The less obvious piece is that CloudFront will only compress files between 1,000 and 10,000,000 bytes (as of writing this post) and it detects the filesize from the Content-Length header. What the documentation doesn't mention is that S3 does not send the Content-Length header by default and so no compression is applied.
Go to S3 and open the properties for your bucket (not for individual files). Expand Permissions and then click Edit CORS Configuration. You need to add Content-Length as an allowed header like this:
(Published to the Fediverse as:
Enable GZIP compression for Amazon S3 hosted website in CloudFront #code#software#s3#cloudfront#aws How to configure Amazon CloudFront to apply gzip compression for websites hosted using Amazon S3 (Simple Storage Service))