Check for an AWS IP
Have an ip address? Want to know if it belongs to one of the AWS ranges? This is the utility for you!
There is no install. There is a Docker image you can use!
$ echo 126.96.36.199 | docker run -i --rm metcalfc/check_aws Found 1 unique addresses Found 0 AWS addresses
What if you want to know what IPs are AWS or what IPs aren't? There are a couple command line arguments for you.
Usage: check_aws.rb [options] -a, --aws Print IPs in AWS ranges -n, --non-aws Print IPs not in AWS ranges -h
One address per line and passed in on stdin.
$ echo "188.8.131.52\n184.108.40.206\n" | docker run -i --rm metcalfc/check_aws -n Found 2 unique addresses NOT found in an AWS range: 220.127.116.11 NOT found in an AWS range: 18.104.22.168 Found 0 AWS addresses
Lots of information is available if AWS addresses are found.
$ echo 22.214.171.124 | docker run -i --rm metcalfc/check_aws -a Found 1 unique addresses 126.96.36.199 found in AWS range 188.8.131.52/16, region us-east-1, service AMAZON Found 1 AWS addresses Found the following regions: us-east-1 Found the following ranges: 184.108.40.206/16
alias check-aws='docker run -i --rm metcalfc/check_aws'