This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2333
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2333 by this push:
     new 1ec9aaf  [DATALAB-2333]: added iteration of policies list
1ec9aaf is described below

commit 1ec9aafe4effb894082b7f82b5c165fd95e34cdb
Author: leonidfrolov <[email protected]>
AuthorDate: Mon May 24 16:04:57 2021 +0300

    [DATALAB-2333]: added iteration of policies list
---
 infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index 1e3a526..5fe23e9 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -956,7 +956,7 @@ def remove_all_iam_resources(instance_type, 
project_name='', endpoint_name=''):
                         print('There is no policy {}-ssn-policy to 
delete'.format(service_base_name))
                     attached_role_policies = 
client.list_attached_role_policies(RoleName=iam_role)
                     if attached_role_policies:
-                        for policy in attached_role_policies:
+                        for policy in 
attached_role_policies['AttachedPolicies']:
                             print('========1')
                             print(policy)
                     role_profiles = 
client.list_instance_profiles_for_role(RoleName=iam_role).get('InstanceProfiles')

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to