Automating secure access to AWS services

Every so often I need to open up access to an AWS service to my home IP address. Unfortunately, my IP address is liable to change when my broadband router reconnects, so I wanted to automate the process of adding my local IP to the AWS security group. I created the following shell script to do this. It will retrieve your externally presenting IP address, and then add a new rule to the security group opening inbound connections to the specified port range. If the script has been run previously, the script will first delete the previously added rule.

Continue reading “Automating secure access to AWS services”