code: def generate_api_gateway():
      
      logger.debug("[#] Setting up the API Gateway")
      client = boto3.client('apigateway', region_name=PRIMARY_REGION)
      matches = [x for x in client.get_rest_apis().get('items', list())
                 if x['name'] == API_GATEWAY]
      if len(matches) > 0:
          logger.debug("[#] API Gateway already setup")
          return matches.pop()
  
      response = client.create_rest_api(
          name=API_GATEWAY,
          description='REST-API to power the Blockade service'
      )
      logger.info("[#] Successfully setup the API Gateway")
  
      return response
docs: Create the Blockade API Gateway REST service.