You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(venv) ubuntu@***************:/usr/local/src/repokid$ python --version
Python 2.7.12
(venv) ubuntu@***************:/usr/local/src/repokid$ cat /etc/issue
Ubuntu 16.04.2 LTS \n \l
(venv) ubuntu@***************:/usr/local/src/repokid$ git show
commit 9dc9403b6659f97ba24adaf44413bb1d92e01a30
Author: Travis McPeak <tmcpeak@netflix.com>
Date: Mon Nov 20 10:40:44 2017 -0800
Change Dispatcher to show perm count
diff --git a/repokid/dispatcher/__init__.py b/repokid/dispatcher/__init__.py
index 89459f9..6321dce 100644
--- a/repokid/dispatcher/__init__.py
+++ b/repokid/dispatcher/__init__.py
@@ -5,6 +5,7 @@ import time
from repokid import CONFIG
import repokid.cli.repokid_cli as cli
import repokid.utils.dynamo as dynamo
+import repokid.utils.roledata as roledata
ResponderReturn = namedtuple('ResponderReturn', 'successful, return_message')
@@ -45,7 +46,8 @@ def list_role_rollbacks(dynamo_table, message):
role_data = dynamo.get_role_data(dynamo_table, role_id, fields=['Policies'])
return_val = 'Restorable versions for role {} in account {}\n'.format(message.role_name, message.account)
for index, policy_version in enumerate(role_data['Policies']):
- return_val += '({:>3}): {:<5} {:<15} {}\n'.format(index, len(str(policy_version['Policy'])),
+ policy_permissions = roledata._get_permissions_in_policy(policy_version['Policy'])
+ return_val += '({:>3}): {:<5} {:<15} {}\n'.format(index, len(policy_permissions),
policy_version['Discovered'],
policy_version['Source'])
return ResponderReturn(successful=True, return_message=return_val)
When running repokid display_role, I always get the following error message:
ubuntu@***************:/usr/local/src/repokid$ repokid display_role <account_id> <role_name>
Loaded config from /usr/local/src/repokid/config.json
Traceback (most recent call last):
File "/usr/local/src/repokid/venv/bin/repokid", line 11, in <module>
load_entry_point('repokid', 'console_scripts', 'repokid')()
File "/usr/local/src/repokid/repokid/cli/repokid_cli.py", line 964, in main
return display_role(account_number, role_name, dynamo_table, config, hooks)
File "/usr/local/src/repokid/repokid/cli/repokid_cli.py", line 533, in display_role
role_id = find_role_in_cache(dynamo_table, account_number, role_name)
File "/usr/local/src/repokid/repokid/utils/dynamo.py", line 143, in find_role_in_cache
ExpressionAttributeValues={':rn': role_name})
File "/usr/local/src/repokid/venv/lib/python2.7/site-packages/boto3-1.4.4-py2.7.egg/boto3/resources/factory.py", line 520, in do_action
response = action(self, *args, **kwargs)
File "/usr/local/src/repokid/venv/lib/python2.7/site-packages/boto3-1.4.4-py2.7.egg/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(**params)
File "/usr/local/src/repokid/venv/lib/python2.7/site-packages/botocore-1.5.92-py2.7.egg/botocore/client.py", line 310, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/src/repokid/venv/lib/python2.7/site-packages/botocore-1.5.92-py2.7.egg/botocore/client.py", line 599, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the Query operation: The table does not have the specified index: RoleName
Unfortunately, I can't find the index RoleName in the documentation. Does the index still have to be added to the documentation?
The text was updated successfully, but these errors were encountered:
Environment
When running repokid display_role, I always get the following error message:
Unfortunately, I can't find the index RoleName in the documentation. Does the index still have to be added to the documentation?
The text was updated successfully, but these errors were encountered: