8000 Getting KeyError: 'RoleName' while trying to remove permissions from a role · Issue #292 · Netflix/repokid · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Getting KeyError: 'RoleName' while trying to remove permissions from a role #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you accoun 9935 t related emails.

Already on GitHub? Sign in to your account

Open
rams3sh opened this issue Nov 1, 2021 · 0 comments

Comments

@rams3sh
Copy link
rams3sh commented Nov 1, 2021

I have configured the aardvark and repokid config accordingly. However once the role cache is updated, trying to remove permissions from a role leads to the below error. I have copied the complete trace below:-

(env) lab-user @ lab ~/Garage/repokid (master)
└─ $ ▶ repokid remove-permissions-from-roles -f roles -c 
Loaded config from /home/lab/Garage/repokid/config.json
  0%|                                                                                                                           | 0/1 [00:00<?, ?it/s]2021-10-31 23:34:37,922 INFO: Replacing Policies With: 

<REDACTED_POLICY>

Traceback (most recent call last):
  File "/home/lab/Garage/repokid/env/bin/repokid", line 33, in <module>
    sys.exit(load_entry_point('repokid', 'console_scripts', 'repokid')())
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/lab/Garage/repokid/repokid/cli/repokid_cli.py", line 236, in remove_permissions_from_roles
    _remove_permissions_from_roles(permissions, role_file, config, hooks, commit=commit)
  File "/home/lab/Garage/repokid/repokid/commands/role.py", line 301, in _remove_permissions_from_roles
    role.remove_permissions(permissions, hooks, commit=commit)
  File "/home/lab/Garage/repokid/repokid/role.py", line 606, in remove_permissions
    current_policies = get_role_inline_policies(self.dict(), **conn) or {}
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/cloudaux/aws/iam.py", line 109, in get_role_inline_policies
    policy_names = get_role_inline_policy_names(role, **kwargs)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/cloudaux/aws/decorators.py", line 43, in decorated_function
    retval = f(*args, **kwargs)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/cloudaux/aws/sts.py", line 220, in decorated_function
    return f(*args, **kwargs)
  File "/home/lab/Garage/repokid/env/lib/python3.8/site-packages/cloudaux/aws/iam.py", line 78, in get_role_inline_policy_names
    RoleName=role['RoleName'],
KeyError: 'RoleName'

Repokid Commit Id: 376aa82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0