Update AWS EC2 inbound security group rules when your IP address changes

By . Updated on

AWS IP Update, a Windows Tray application that automatically updates EC2 inbound security rules when an IP address change is detected.

I just released AWS IP Update, a Windows Tray application that updates inbound security group rules on AWS EC2 when your IP address changes.

This has been vaguely on my to-do list for years. I didn't bother because I knew how tedious it would be from that time I pulled Azure metrics into Google Data Studio (now Looker) via Apps Script. This whole thing was banged out by Claude Code in five volleys, and I think I wasted those because it could probably have single-shotted it. I did not write a character of code, and it was faster to create than the way I used to get access.

I have a monthly sys admin day where I patch all the things, pull a Google photos archive and run an old fashioned backup to an external hard drive. The hardest part of this psychologically hasĀ been getting access to AWS to patch by blog server and pull a backup. My IP address has changed, and I need to log into AWS, find the right settings, look up my external IP address (Google Search used to just show this but it's been broken for ages) and update the EC2 security group. Every other part of the routine is easy, the access part always bums me out. So this is a quick AI tool that not only saves a few minutes a month, it also helps with mood and blood pressure.

Enable GZIP compression for Amazon S3 hosted website in CloudFront

By . Updated on

Enable GZIP compression for Amazon S3 hosted website in CloudFront

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:

Compress Objects Automatically option in Amazon 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: