  def AttachPolicyToRole(self, policy_arn: str, role_name: str) -> None:
    """Attaches an IAM policy to an IAM role.

    Args:
      policy_arn (str): The Policy Arn.
      role_name (str): The Role Name.

    Raises:
      ResourceNotFoundError: If attaching the policy to the role failed.
    """
    logger.info('Attaching policy {0:s} to role {1:s}'
      .format(policy_arn, role_name))
    try:
      self.client.attach_role_policy(RoleName=role_name, PolicyArn=policy_arn)
    except Exception as e:
      raise errors.ResourceNotFoundError(
        'Attaching policy {0:s} to role {1:s} failed'
        .format(policy_arn, role_name), __name__) from e
Attaches an IAM policy to an IAM role.

Args:
policy_arn (str): The Policy Arn.
role_name (str): The Role Name.

Raises:
ResourceNotFoundError: If attaching the policy to the role failed.
libcloudforensics/providers/aws/internal/iam.py