believe the last of the print issues should be fixed
This commit is contained in:
@@ -49,7 +49,7 @@ def review_encrypted_volumes(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
if e.response['Error']['Code'] == 'UnauthorizedOperation':
|
if e.response['Error']['Code'] == 'UnauthorizedOperation':
|
||||||
print('{} : (UnauthorizedOperation) when calling the DescribeVolumes -- sure you have ec2 permissions?' .format(AWS_ACCESS_KEY_ID))
|
print('{} : (UnauthorizedOperation) when calling the DescribeVolumes -- sure you have ec2 permissions?' .format(AWS_ACCESS_KEY_ID))
|
||||||
else:
|
else:
|
||||||
print e
|
print(e)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ def get_instance_details(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
pp.pprint(i)
|
pp.pprint(i)
|
||||||
|
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
print e
|
print(e)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ def get_instance_volume_details(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
pp.pprint(volumes)
|
pp.pprint(volumes)
|
||||||
|
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
print e
|
print(e)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
|
|
||||||
@@ -117,7 +117,6 @@ def get_instance_volume_details2(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
print("\n")
|
print("\n")
|
||||||
|
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
print e
|
print(e)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ def check_root_account(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
print('User {} likely has console access and the password can be reset :-)' .format(user['UserName']))
|
print('User {} likely has console access and the password can be reset :-)' .format(user['UserName']))
|
||||||
print("Checking for MFA on account")
|
print("Checking for MFA on account")
|
||||||
mfa = client.list_mfa_devices(UserName=user['UserName'])
|
mfa = client.list_mfa_devices(UserName=user['UserName'])
|
||||||
print mfa['MFADevices']
|
print(mfa['MFADevices'])
|
||||||
|
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
if e.response['Error']['Code'] == 'NoSuchEntity':
|
if e.response['Error']['Code'] == 'NoSuchEntity':
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ def describe_stacks(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
)
|
)
|
||||||
response = client.describe_stacks()
|
response = client.describe_stacks()
|
||||||
#debug
|
#debug
|
||||||
print response
|
print(response)
|
||||||
if response.get('Stacks') is None:
|
if response.get('Stacks') is None:
|
||||||
print("{} likely does not have Lambda permissions\n" .format(AWS_ACCESS_KEY_ID))
|
print("{} likely does not have Lambda permissions\n" .format(AWS_ACCESS_KEY_ID))
|
||||||
elif len(response['Stacks']) <= 0:
|
elif len(response['Stacks']) <= 0:
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ def describe_db_instances(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY):
|
|||||||
pp.pprint(i)
|
pp.pprint(i)
|
||||||
|
|
||||||
except botocore.exceptions.ClientError as e:
|
except botocore.exceptions.ClientError as e:
|
||||||
print e
|
print(e)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("CTRL-C received, exiting...")
|
print("CTRL-C received, exiting...")
|
||||||
@@ -55,6 +55,6 @@ for region in regions:
|
|||||||
# pp.pprint(resourcetype['resourceTypes'][0])
|
# pp.pprint(resourcetype['resourceTypes'][0])
|
||||||
|
|
||||||
ruleresponse = describe_configuration_recorders(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, region)
|
ruleresponse = describe_configuration_recorders(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, region)
|
||||||
print ruleresponse
|
print(ruleresponse)
|
||||||
|
|
||||||
print_section_header_and_footer("END OF CONFIG SERVICE REVIEW", True)
|
print_section_header_and_footer("END OF CONFIG SERVICE REVIEW", True)
|
||||||
|
|||||||
Reference in New Issue
Block a user