function getCustomRouteTables()

in amplify/backend/function/awssyncroutes/src/app.js [111:126]


function getCustomRouteTables(routeTables, mainRouteTableId) {
  const customRouteTables = routeTables.filter((routeTable) => {
    let isCustomRouteTable = false;

    // Exclude the default route table in this VPC
    if (routeTable.RouteTableId !== mainRouteTableId) {
      isCustomRouteTable = routeTable.Associations.filter((routeTableAssociation) => {
        return routeTableAssociation.Main === true;
      }).length === 0;
    }

    return isCustomRouteTable;
  });

  return customRouteTables;
}