Created
December 14, 2015 09:37
-
-
Save bmwant/8ad1f306c1bd8a7b8e68 to your computer and use it in GitHub Desktop.
AWS boto3 some calls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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