Python Boto Code to keep your EC2 instance’s Security Group to be in sync with your changing Public IP

I came across a StackOverflow Question about securing and coping with your Public IP changes which is done by ISP as they tend to recycle the IP from their pool of IPs. Generally every time when your public IP changes, chances are you wouldn’t connect to your EC2 Instance as you would have enabled ingress access only to your then Public IP address ( unless you want to use which is not recommended).

I have tried to put down a small Python Boto Script which would get your Public IP address, sets that your Security group. You can enter your designated “Security Group Name”; then you can schedule it using a CRON process.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s