Creates and starts the local API Gateway service. This method will block until the service is stopped
        manually using an interrupt. After the service is started, callers can make HTTP requests to the endpoint
        to invoke the Lambda function and receive a response.

        NOTE: This is a blocking call that will not return until the thread is interrupted with SIGINT/SIGTERM

def start(self):
        """
        Creates and starts the local API Gateway service. This method will block until the service is stopped
        manually using an interrupt. After the service is started, callers can make HTTP requests to the endpoint
        to invoke the Lambda function and receive a response.

        NOTE: This is a blocking call that will not return until the thread is interrupted with SIGINT/SIGTERM
        """

        routing_list = self._make_routing_list(self.api_provider)

        if not routing_list:
            raise NoApisDefined("No APIs available in SAM template")

        static_dir_path = self._make_static_dir_path(self.cwd, self.static_dir)

        # We care about passing only stderr to the Service and not stdout because stdout from Docker container
        # contains the response to the API which is sent out as HTTP response. Only stderr needs to be printed
        # to the console or a log file. stderr from Docker container contains runtime logs and output of print
        # statements from the Lambda function
        service = LocalApigwService(routing_list=routing_list,
                                    lambda_runner=self.lambda_runner,
                                    static_dir=static_dir_path,
                                    port=self.port,
                                    host=self.host,
                                    stderr=self.stderr_stream)

        service.create()

        # Print out the list of routes that will be mounted
        self._print_routes(self.api_provider, self.host, self.port)
        LOG.info("You can now browse to the above endpoints to invoke your functions. "
                 "You do not need to restart/reload SAM CLI while working on your functions, "
                 "changes will be reflected instantly/automatically. You only need to restart "
                 "SAM CLI if you update your AWS SAM template")

        service.run()