Don't wait for instance checks, check for ssh access and use this to decide ready state.
# E.g.
for host in ${hosts[@]} ; do
if [ ! "$(ssh -q \
-o StrictHostKeyChecking=no \
-o "BatchMode=yes" \
-o "ConnectTimeout=15" \
-i "$PEM_PATH/$PEM_FILE" \
-p $REMOTE_PORT \
$USER@$host echo up)" == "up" ] ; then
echo "Host $host is not responding"
fi
done
Tried this but it's not really viable to depend on purely having an ssh connection. The extra delay waiting for the instance status checks is probably worth the assurance that the test will run okay.
Don't wait for instance checks, check for ssh access and use this to decide ready state.