Ecosystems live within biomes. This is true for both land ecosystems and terrestrial biomes as well as aquatic ecosystems and aquatic biomes.
For example, a terrestrial biome would be a rainforest. Within that terrestrial biome, a land ecosystem would be the Amazon rainforest, and within the Amazon rainforest, a microecosystem would be a rotting log.