Skip to content

Instantly share code, notes, and snippets.

@axelabs
Created March 22, 2022 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axelabs/f5e72a8c6a033fbfa88b13ea1d3be299 to your computer and use it in GitHub Desktop.
Save axelabs/f5e72a8c6a033fbfa88b13ea1d3be299 to your computer and use it in GitHub Desktop.
Get at botocore endpoint region data
#!/usr/bin/env python3.7
import botocore, json
from pathlib import Path
with open("{}/{}".format(Path(botocore.__file__).resolve().parent, "data/endpoints.json"), 'r') as e:
for p in json.load(e)['partitions']:
print("{}:\t\t{}".format(p['partitionName']," ".join(p['regions'].keys())))
@axelabs
Copy link
Author

axelabs commented Mar 22, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment