  def CheckInstanceProfileExists(self, profile_name: str) -> bool:
    """Check if an instance role exists.

    Args:
      profile_name (str): Instance profile name.

    Returns:
      bool: True if the Instance Profile exists, false otherwise.
    """

    try:
      self.client.get_instance_profile(InstanceProfileName=profile_name)
      return True
    except self.client.exceptions.NoSuchEntityException:
      return False
Check if an instance role exists.

Args:
profile_name (str): Instance profile name.

Returns:
bool: True if the Instance Profile exists, false otherwise.
libcloudforensics/providers/aws/internal/iam.py