code: def ssh_calc_aws(node):
      
      userlu = {"ubunt": "ubuntu", "debia": "admin", "fedor": "root",
                "cento": "centos", "openb": "root"}
      image_name = node.driver.get_image(node.extra['image_id']).name
      if not image_name:
          image_name = node.name
      usertemp = ['name'] + [value for key, value in list(userlu.items())
                             if key in image_name.lower()]
      usertemp = dict(zip(usertemp[::2], usertemp[1::2]))
      username = usertemp.get('name', 'ec2-user')
      return username
docs: Calculate default ssh-user based on image-if of AWS instance.