Write a simple script to take the AWS IP ranges from https://ip-ranges.amazonaws.com/ip-ranges.json
and output the range and location for each range in CSV format, e.g.:
23.20.0.0/14,"CA, US"
27.0.0.0/22,"Tokyo, JP"
...
You can use the following JSON to map from AWS region to location:
{
"ap-northeast-1": "Tokyo, JP",
"ap-southeast-1": "SG",
"ap-southeast-2": "Sydney, AU",
"eu-central-1": "Frankfurt, DE",
"eu-west-1": "IE",
"sa-east-1": "Sao Paulo, BR",
"us-east-1": "VA, US",
"us-west-1": "CA, US",
"us-west-2": "OR, UA"
}
Coffee script is preferred, but you can use whatever you're comfortable with. Please put the script on github as a gist and send me the link.