you could probably factor out the ssh connection logic from apply(...) and use it here, then immediately disconnect.  Because all the script chaos types would need this logic, it seems like we would need to cache the check results per instances so we dont have to connect to the instance once for each script chaos type