fix aws script to handle spot instances