Wait for the AMI to be available before terminating the instance.