Skip to content

Instantly share code, notes, and snippets.

@mr-brody
Last active May 13, 2018 01:52
Show Gist options
  • Save mr-brody/5cf16072fb1802db5d0cb5036d9eb77d to your computer and use it in GitHub Desktop.
Save mr-brody/5cf16072fb1802db5d0cb5036d9eb77d to your computer and use it in GitHub Desktop.
import boto3
client = boto3.client('ec2', aws_access_key_id=access_key, aws_secret_access_key=secret_key,
region_name='us-east-1')
ec2_regions = [region['RegionName'] for region in client.describe_regions()['Regions']]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment