removed hardcoded region from roles assumable
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user