title: How do I automate the substitution of assigned inbound rules with public IP addresses within and across security groups in AWS?
body: <p>My current setup on EC2 Management Console involves:</p>
  <ul>
  <li>multiple security groups representing various resources on AWS</li>
  <li>multiple inbound rules within a security group representing people's public IP addresses that are whitelisted to access the resource</li>
  </ul>
  <p>Currently, when a person's public IP address changes because of ISP issues, I have to manually go into EC2MC and change the inbound rule associated with that person to allow them access. There are multiple inbound rules within a security group and multiple security groups that this person is whitelisted for. Rather than changing, for instance, 9 rules manually, I'm wondering if there's a way to launch a script that prompts for the security group name, person's name, and new IP address so that this substitution occurs automatically?</p>
  <p><a href="https://i.stack.imgur.com/WOdRE.png" rel="nofollow noreferrer">Example layout of security groups</a></p>
  <p><a href="https://i.stack.imgur.com/6Fnur.png" rel="nofollow noreferrer">Example layout of inbound rules within a security group</a></p>
  <p>Any advice is appreciated!</p>