move comments around for pydocs functionality

This commit is contained in:
carnal0wnage
2018-04-19 23:03:08 -04:00
parent 6428dca3af
commit 6c6359476f
26 changed files with 239 additions and 167 deletions

View File

@@ -1,12 +1,12 @@
'''
STS libs for WeirdAAL
'''
import boto3
import botocore
import pprint
import sys
'''
STS libs for WeirdAAL
'''
pp = pprint.PrettyPrinter(indent=5, width=80)
# from http://docs.aws.amazon.com/general/latest/gr/rande.html
@@ -21,6 +21,10 @@ AWS_ACCESS_KEY_ID = credentials.access_key
def sts_get_accountid():
'''
Use STS functions to get account data
ex: Account Id: 14681234567
'''
try:
client = boto3.client("sts")
account_id = client.get_caller_identity()["Account"]
@@ -40,6 +44,10 @@ def sts_get_accountid():
def sts_get_accountid_all():
'''
Use STS functions to get account data (detailed)
Prints AccountID, UserID, ARN
'''
try:
client = boto3.client("sts")
account_id = client.get_caller_identity()["Account"]