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 220.127.116.11 | 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 "18.104.22.168\n22.214.171.124\n" | docker run -i --rm metcalfc/check_aws -n Found 2 unique addresses NOT found in an AWS range: 126.96.36.199 NOT found in an AWS range: 188.8.131.52 Found 0 AWS addresses
Lots of information is available if AWS addresses are found.
$ echo 184.108.40.206 | docker run -i --rm metcalfc/check_aws -a Found 1 unique addresses 220.127.116.11 found in AWS range 18.104.22.168/16, region us-east-1, service AMAZON Found 1 AWS addresses Found the following regions: us-east-1 Found the following ranges: 22.214.171.124/16
alias check-aws='docker run -i --rm metcalfc/check_aws'