From 303ba79742c7d7680b06958928b82fb9d217c0d9 Mon Sep 17 00:00:00 2001 From: Kenneth Toler Date: Tue, 25 Sep 2018 16:31:54 -0400 Subject: [PATCH] removed hardcoded region from roles assumable --- libs/iam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/iam.py b/libs/iam.py index 2d3121b..25f3cf4 100644 --- a/libs/iam.py +++ b/libs/iam.py @@ -462,7 +462,7 @@ def iam_list_roles_assumable(): print("### Roles that can be Assumed by AWS Principals ###") try: for region in regions: - client = boto3.client('iam', region_name="us-east-1") + client = boto3.client('iam', region_name=region) response = client.list_roles() roles = response.get("Roles") for role in roles: