db updates and an iam function

This commit is contained in:
carnal0wnage
2018-05-01 19:21:21 -04:00
parent 32ec7ae4fb
commit fa6400ee41
6 changed files with 39 additions and 13 deletions

View File

@@ -129,6 +129,21 @@ def get_password_policy():
except KeyboardInterrupt:
print("CTRL-C received, exiting...")
def get_account_authorization_details():
'''
Get the account authoirzation details
'''
client = boto3.client('iam', region_name=region)
try:
deets = client.get_account_authorization_details()
print("Account Authorization Details:")
pp.pprint(deets['UserDetailList'])
except botocore.exceptions.ClientError as e:
print("Unexpected error: {}" .format(e))
except KeyboardInterrupt:
print("CTRL-C received, exiting...")
def iam_create_user(username):
'''