Created
May 24, 2014 01:50
-
-
Save shawnbutts/b4e37b5fb7b7ce1e0ef4 to your computer and use it in GitHub Desktop.
get_aws_account_id
This file contains 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
def get_aws_account_id(): | |
conn_iam = boto.connect_iam() | |
ret = conn_iam.get_all_users()['list_users_response']['list_users_result']['users'][0]['arn'].split(':')[4] | |
return(ret) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment