Provisioning services for Internet of Things (IoT) devices leads to severalchallenges: heterogeneity of IoT devices, varying Quality of Services (QoS)requirements, and increasing availability of both Cloud and Fog resources. Thelast of these is most significant to cope with the limitations of Cloud infrastructureproviders (CIPs) for latency-sensitive services. Many Fog infrastructure providers(FIPs) have recently emerged and their number is increasing continually. FLEX isproposed in this work as a platform for selecting a location for service placementin a multi-Fog and multi-Cloud environment. For each service, FLEX broadcastsservice requirements to the resource managers (RMs) of the available Fog andCloud service providers and then selects the most suitable provider for that service.FLEX is scalable and flexible as it leaves it up to the RMs to have their ownpolicy for the placement of submitted services. Service placement and resource selectionhas been formulated as an optimization problem and an efficient heuristicalgorithm is proposed to solve it. Results show that the proposed algorithm canbe used across both Cloud and Fog-based providers.