'Resize the instance group to the new capacity.
When shrinking, the oldest instances will be removed.'

def resize(self, new_capacity):

    new_template = self._create_template(new_capacity)
    try:
        updater = self.update_with_template(new_template)
        checker = scheduler.TaskRunner(self._check_for_completion, updater)
        checker(timeout=self.stack.timeout_secs())
    finally:
        self._lb_reload()
