diff --git a/airiam/find_unused/PolicyAnalyzer.py b/airiam/find_unused/PolicyAnalyzer.py index 577642e..0176876 100644 --- a/airiam/find_unused/PolicyAnalyzer.py +++ b/airiam/find_unused/PolicyAnalyzer.py @@ -59,7 +59,7 @@ def policy_is_write_access(policy_document): try: action_regex = action_name.replace('*', '.*') action_objs = [] - for priv, priv_obj in action_map.get(action_service, {}).get('privileges', []).items(): + for priv, priv_obj in action_map.get(action_service, {}).get('privileges', {}).items(): if re.match(action_regex, priv): action_objs.append(priv_obj) except StopIteration: