Sunday 21 June 2020

How do I check if IP is whitelisted on Ec2 instance?

With many service groups and rules whitelisting access in the service group, it is often difficult to find out if specific IP is white listed or not. Or sometimes you need list of all the rules attached to a specific Ec2 instance.


ec2-whitelistcheck.py  : Is a Python boto3 script that will accept Instance ID as input and
        ec2 :  Print all the Rules attached to Instance
        ec2check : Check whether specified IP is whitelisted or not. Can accept multiple IP addresses.


Boto3 python script whitelist security group aws