script to change the ami out from under an autoscale group
Factoring out logic for grabbing a connection into its own function