Member-only story

Update AWS SG With cli

Jim Kang
Mar 8, 2023

--

Photo by Brett Jordan on Unsplash

We usually allow our IP into a EC2 with the security group that allow our IP. Unfortunately our IP changes (well, at least Tatooine does) and we’ll have to log into AWS and change it from there.

Let’s use the aws-cli so we can get lazy with a script

You’ll need 3 things before you start:

  1. AWS cli (assume you’ve installed it, if not google it, smarty)
  2. The security-gruop-id
  3. The security-group-rule-id
aws console security-gruop-id
aws console security-group-rule-id

Here’s the script

Hope I made you lazier, haha

--

--

Jim Kang
Jim Kang

Written by Jim Kang

love writing bit sized programming memo, acoustic guitarist, proud daddy of 5 and great listener (to my kids)

No responses yet