Updated: Mar 25
I rent a little house on a huge ranch a touch over an hour northwest of Austin, TX. I also work as a software engineer for Quansight primarily utilizing Python. The beauty of this setup is the hybrid techy/rural lifestyle I enjoy. And the baby bison. The downside, the internet.
(photo from my kitchen window)
My only source of internet is via a cell phone hotspot. Luckily, modern cell phone plans offer just enough data to make this possible-so long as you’re willing to sacrifice Netflix binges. One side effect of using a cell phone hotspot is a constantly changing public IP address. For most folks, this isn’t a problem. When working on Amazon EC2 instances that utilize IP address whitelists to secure SSH traffic, it’s a pain. Each day (and randomly throughout) my IP address will change. Every time it changed I would perform this ritual:
Login to AWS console
Open the corresponding security group
Lookup my IP on Google
Add the new IP
This got old fast.
After living with this extremely manual process for several months, I was in a meeting with a DevOps engineer who said: “Whenever I have to do something twice, I automate it.” This was the motivation I needed to rid myself of a repetitive task. The first tool that came to mind was AWS CLI. I was very familiar with this command line tool after using it on several different projects. I considered a Bash script, but quickly remembered how little fun I had last time I created a Bash script. There had to be a better way without having to deal with a new language for a single task.