removed hardcoded region from roles assumable

This commit is contained in:
Kenneth Toler
2018-09-25 16:31:54 -04:00
parent a07d643c44
commit 303ba79742

View File

@@ -462,7 +462,7 @@ def iam_list_roles_assumable():
print("### Roles that can be Assumed by AWS Principals ###") print("### Roles that can be Assumed by AWS Principals ###")
try: try:
for region in regions: for region in regions:
client = boto3.client('iam', region_name="us-east-1") client = boto3.client('iam', region_name=region)
response = client.list_roles() response = client.list_roles()
roles = response.get("Roles") roles = response.get("Roles")
for role in roles: for role in roles: