Skip to content

Instantly share code, notes, and snippets.

@bmwant
Created December 14, 2015 09:37
Show Gist options
  • Save bmwant/8ad1f306c1bd8a7b8e68 to your computer and use it in GitHub Desktop.
Save bmwant/8ad1f306c1bd8a7b8e68 to your computer and use it in GitHub Desktop.
AWS boto3 some calls
# Setup docs: http://boto3.readthedocs.org/en/latest/guide/quickstart.html
import boto3
# List all regions
client = boto3.client('ec2')
regions = client.describe_regions()['Regions']
for region in regions:
print('Name: %s. Endpoint: %s' % (region['RegionName'], region['Endpoint']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment