Skip to content

Instantly share code, notes, and snippets.

@packetchef
Created January 1, 2020 23:00
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 packetchef/9cf88a2777f1fac83b64b79a0c547e67 to your computer and use it in GitHub Desktop.
Save packetchef/9cf88a2777f1fac83b64b79a0c547e67 to your computer and use it in GitHub Desktop.
# OK, yes, it's technically 3 lines, 4 if you include this comment
import boto3
ec2 = boto3.client('ec2')
regions = [ r['RegionName'] for r in ec2.describe_regions()['Regions'] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment