Given a command to execute and stage,
        execute that command.

def dispatch_command(self, command, stage):
        """
        Given a command to execute and stage,
        execute that command.
        """

        self.api_stage = stage

        if command not in ['status', 'manage']:
            if not self.vargs.get('json', None):
                click.echo("Calling " + click.style(command, fg="green", bold=True) + " for stage " +
                           click.style(self.api_stage, bold=True) + ".." )

        # Explicitly define the app function.
        # Related: https://github.com/Miserlou/Zappa/issues/832
        if self.vargs.get('app_function', None):
            self.app_function = self.vargs['app_function']

        # Load our settings, based on api_stage.
        try:
            self.load_settings(self.vargs.get('settings_file'))
        except ValueError as e:
            if hasattr(e, 'message'):
                print("Error: {}".format(e.message))
            else:
                print(str(e))
            sys.exit(-1)
        self.callback('settings')

        # Hand it off
        if command == 'deploy': # pragma: no cover
            self.deploy(self.vargs['zip'])
        if command == 'package': # pragma: no cover
            self.package(self.vargs['output'])
        if command == 'template': # pragma: no cover
            self.template(      self.vargs['lambda_arn'],
                                self.vargs['role_arn'],
                                output=self.vargs['output'],
                                json=self.vargs['json']
                            )
        elif command == 'update': # pragma: no cover
            self.update(self.vargs['zip'], self.vargs['no_upload'])
        elif command == 'rollback': # pragma: no cover
            self.rollback(self.vargs['num_rollback'])
        elif command == 'invoke': # pragma: no cover

            if not self.vargs.get('command_rest'):
                print("Please enter the function to invoke.")
                return

            self.invoke(
                self.vargs['command_rest'],
                raw_python=self.vargs['raw'],
                no_color=self.vargs['no_color'],
            )
        elif command == 'manage': # pragma: no cover

            if not self.vargs.get('command_rest'):
                print("Please enter the management command to invoke.")
                return

            if not self.django_settings:
                print("This command is for Django projects only!")
                print("If this is a Django project, please define django_settings in your zappa_settings.")
                return

            command_tail = self.vargs.get('command_rest')
            if len(command_tail) > 1:
                command = " ".join(command_tail) # ex: zappa manage dev "shell --version"
            else:
                command = command_tail[0] # ex: zappa manage dev showmigrations admin

            self.invoke(
                command,
                command="manage",
                no_color=self.vargs['no_color'],
            )

        elif command == 'tail': # pragma: no cover
            self.tail(
                colorize=(not self.vargs['no_color']),
                http=self.vargs['http'],
                non_http=self.vargs['non_http'],
                since=self.vargs['since'],
                filter_pattern=self.vargs['filter'],
                force_colorize=self.vargs['force_color'] or None,
                keep_open=not self.vargs['disable_keep_open']
            )
        elif command == 'undeploy': # pragma: no cover
            self.undeploy(
                no_confirm=self.vargs['yes'],
                remove_logs=self.vargs['remove_logs']
            )
        elif command == 'schedule': # pragma: no cover
            self.schedule()
        elif command == 'unschedule': # pragma: no cover
            self.unschedule()
        elif command == 'status': # pragma: no cover
            self.status(return_json=self.vargs['json'])
        elif command == 'certify': # pragma: no cover
            self.certify(
                no_confirm=self.vargs['yes'],
                manual=self.vargs['manual']
            )
        elif command == 'shell': # pragma: no cover
            self.shell()