in chalice/policy.py [0:0]
def _get_actions_from_high_level_calls(self,
service: str,
client_calls: Dict[str, Set[str]]
) -> List[str]:
# This gets any actions associated with high level abstractions
# e.g s3.download_file(), s3.upload_file(), etc.
if service not in self._custom_policy_actions:
# We don't warn the user in this case but it's unlikely there
# are high level abstractions for a service, this only applies
# to s3, dynamodb, and a few other services.
return []
service_actions = self._custom_policy_actions[service]
method_calls = client_calls[service]
actions: Set[str] = set()
for method_name in method_calls:
if method_name in service_actions:
actions.update(service_actions[method_name])
return list(sorted(actions))